3 ms·
Much of the criticisms that I've read about prolog are very specific about prolog (I am not an expert here, though). Further, the fact that prolog-like languag
by harperlee 11y ago
Much of the criticisms that I've read about prolog are very specific about prolog (I am not an expert here, though).
Further, the fact that prolog-like languages (be kanren-like languages part of those or not) have issues should not be a basis for discarding all of them. Useful niches can be found, and their problems might be solved.
More in general, the idea that I can take a function, and provide an argument less, and a result, and the function is inverted (in a mathematical sense) for free, seems very, very powerful. The main alternative is to have two functions, one the inverse of another, that use the same building blocks for reuse, but that puts a cognitive overhead to the program, whereas a person understands most inversions quite easily.
- kpmah 11y agoIt's a really interesting area, but I think anyone who wants to push for this style of programming would do well to investigate why Prolog never really took off in the 40 years it's been around. Of course, that could have nothing to do with its fundamental model.
- nickpsecurity 11y agoI agree. Prolog isn't logic programming: it's a specific approach to first-order, logic programming. So, it's failures can't be considered failures of first-order or other logic programming by default. One has to look at the nature of the failure to determine where the blame is. Then see if there's a way to fix that. And if not, only then say "This appears to be a weakness of X that justifies using a different tool." That said, most work that's successful avoids first-order logic in favor of tools such as Isabelle/HOL or Coq. They also support extraction to Ocaml, etc w/ certified compilers in works for them. Maybe better to use those for logic programming. I'm not a domain expert in that field so can't be sure. For people doing first-order, though, the Mercury language and Visual Prolog app are best I know of with plenty examples.