Encouraging industry about Prolog

When I first started programming in the commercial world, the shops (a group of programmers at a company) as they were called, tended to use just one programming language (C, COBOL, Fortran, assembly) and using any other programming language was taboo. Then as the Internet arrived many started to diversify in the programming languages they used because you typically had to use HTML and SQL and then others but even then and to a good extend now, logic programming and purely functional programming was not picked up.

To chime in on your comment, I do agree that in order to make head way with getting industry to make more use of logic programming, be it Prolog, LogTalk, or something else, that you have to address specific use cases. In other words if someone comes to me and tries to convince me that one programming language is the answer to all of your programming needs, they will not get much of my attention, but if they point out that any programming language are not great at every thing but here are some specific use cases that this paradigm (logic programming) will make an impact, then they will get my attention.

Another way to get logic programming into industry is by the back door. The other day a logic programming question popped up on StackOverflow but it was used as a subset of an app, and the logic was used selection rules. However I hate to say it that it is not getting answers and I even commented on possibly why. (Maybe I should take the time to learn Garret logic rules and answer the question). If logic programming is added to open source popular projects for certain use-cases and gets into the project, then industry will be using logic programming whether they know it or not.

One use case that I find in very few other programming languages, and while not specific to logic programming languages, is almost exclusive to them and has the easiest syntax to use is DCGs. But it is not the use of DCGs specifically that I find of value, but the use of DCGs for lexing and parsing. I have written lexers and parsers in many different programming languages and with different apps/tools/generators, and as I have noted here before, using DCGs for lexing and parsing is by far the nicest way to go. Now while many in industry may want a faster parser than DCGs, there is nothing that says the prototype for the lexer parser can not be done with DCGs, then once the grammar is stable and found to be deterministic, it can then easily be converted to something like lex/yacc or Bison or something. Don’t think about using logic programming for just the final product but as a prototype language, which is another use case where it excels.