Logic programming is overrated, at least for logic puzzles (2013)
For me, I think the problem is that normal, boring, stupid, unsophisticated, plebian imperative programming lives in a world of O(1) operations. That is to say, a &quot;normal&quot; line of code you type will be O(1), and then you generally start gluing those together with various things that start stacking on O(n) complexities. As things like the accidentally quadratic blog [1], in the normal programming world it is a bit humorous to even so much as accidentally stack two of those things unnecessarily on top of each other.<p>Certainly, people manage to make poorly performing things even so, but at least at the base level, your primitives may be stupid, but they are generally fast.<p>The logic programming world works in a default space of O(n) operations, that stack together more freely than the imperative world, and that gives easy access to O(2^n). Since this is essentially impossible, a great deal of work is done to try to get that down, but you&#x27;re always intrinsically starting behind the eight-ball. It is easier to work up from O(1) operations than to write an exponential or super-exponential algorithm and then try to trim it back down to a decent complexity for a normal programmer.<p>I think this is the root cause as to why logic programming is generally not something we see a lot of. It&#x27;s like a wild stallion; it may be powerful but the amount of effort you pour into just keeping it under control may exceed any benefit you could get.<p>It isn&#x27;t useless, of course. Amazing work has been done in the field of SAT solvers, and there&#x27;s certainly a niche for it. The problems that are intrinsically higher-order polynomials or (technically) exponential, well, they are what they are and if you&#x27;re going to be stuck in that world, logic programming may offer you a much better toolset than conventional programming on its own. But there was a hope a long time ago, in the Prolog era, that it could become part of the normal toolkit of general purpose programming, and I don&#x27;t think that will ever happen, because of this line of logic.<p>This is a bit tangential to the article, it&#x27;s just what I happened to read that finally crystallized this in my mind.<p>[1]: <a href="https:&#x2F;&#x2F;accidentallyquadratic.tumblr.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;accidentallyquadratic.tumblr.com&#x2F;</a>