3 ms·
Prolog may suffer from a lack of popularity, but I'd argue that's not because it's lacking in power as a means of expressing an idea. Nor is it due to a hardwar
by TimTheTinker 7y ago
Prolog may suffer from a lack of popularity, but I'd argue that's not because it's lacking in power as a means of expressing an idea. Nor is it due to a hardware paradigm mismatch.
Lisp and its variants (especially Clojure) enjoy increasing popularity for all sorts of general-purpose use. Lisp is merely a particular notation for expressing lambda calculus, and is rather far removed from the realities of Von Neumann hardware.
I'd argue Prolog's demise is due to three facts: (a) the sorts of ideas best expressed in Prolog have diminished due to new languages becoming available, (b) the remaining ideas best expressed in Prolog are only applicable to a narrow set of problems, and (c) Prolog itself isn't the most ergonomic language to use, so it isn't often people's first choice when alternatives are available.
- SOLAR_FIELDS 7y agoCan you elaborate with an example or two? I’ve always been fascinated by Prolog and thought of it as a language that is very well suited to a specific class of problems. It would be interesting to know what class of problem Prolog excels at and why newer languages or new features in existing languages can do what only Prolog did before.
- TimTheTinker 7y agoI'm afraid I can't -- sorry. I'm not a Prolog practitioner. My above observations are just culled from what I've read over the years. I suspect some kinds of expert systems remain best implemented using some Prolog. Perhaps someone who uses Prolog regularly can chime in.
- blihp 7y agoYou don't even have to look at recent languages... probably the best example of (a) is SQL. SQL arrived a couple of years after Prolog in the 70's, but over the decades SQL has absolutely dominated. Unfortunately for Prolog, SQL provides much of the same functionality while also having the advantage of being a more natural fit for business applications which drove adoption. (and quite likely directly hurt Prolog's prospects)
- slifin 7y agoWe also use a subset of prolog in Clojure called datalog for a couple of databases
- cgrand-net 7y agoDatalog is the safe subset of Prolog. http://abiteboul.blogspot.com/2012/08/datalog-revival-for-database-geeks-only.html?m=1 http://abiteboul.blogspot.com/2012/08/datalog-revival-for-da...
- cgrand-net 7y agoI would argue that lambda calculus without pervasive lazy evaluation is not lambda calculus. Lisps in general don’t have it (unlike Haskell) and make them not so removed from hardware (once hardware stacks were added to CPUs). For long Lisps didn’t even have lexical closures!