5 ms·
Having taught logic programming a few times, I have come to the conclusion that it is a worthwhile thing, but it should not be thought of primarily as a program
by ggchappell 13y ago
Having taught logic programming a few times, I have come to the conclusion that it is a worthwhile thing, but it should not be thought of primarily as a programming paradigm. Rather, it is a technique that a programmer should be able to make use of within the framework of a larger program.
An analogy: a good programmer should be able to write a state machine. And these are occasionally useful. However, just because a state machine plus a large bidirectional sequential-access data store can do any computation whatsoever[1], does not mean that it is a good idea to write all our programs this way.
Similarly, logic programming and the associated unification operation make up a Turing-complete system, but ... so what? I think that logic programming ought to be available as a library in every programming language. But I don't see the point in making it the only functionality there is.
And, of course, core.logic is an attempt at doing just this for Clojure. (And then there is Pyke ....) However, as this article -- along with the article it references -- notes, we have not really figured out how to integrate logic programming with more mainstream programming methods. This, I think, is a problem well worth solving.
[1] Think "Turing Machine".