6 ms·
Nice! I've study a super-little-bit prolog at university time but I do not really understand it... I still have to understand "why prolog?" at all but perhaps
by xte 8y ago
Nice!
I've study a super-little-bit prolog at university time but I do not really understand it... I still have to understand "why prolog?" at all but perhaps sooner or later I'll try to review it a bit with this site-book :-)
- arthurcolle 8y agoProlog is great for a thing called constraint satisfaction. You define a bunch of predicates, which may or may not have meaning in the implicit dependencies, and then the language is able to extract logical relationships between those atoms in these defined predicates. You might have had an instructor who himself hadn't really mastered the language, or maybe he didn't grok it - because it's very beautiful and intuitive when its laid out properly. It was the language I picked up the fastest in all of my coursework, just super elegant and bare bones. OT, but another point to note is that the original Erlang VM and interpreter was implemented in Prolog, which (because of Joe Armstrong's affinity for the language) might be why there are so many subtle syntactical similarities between the two languages. This tutorial does a pretty good job at first glance, but I feel like there could be some more sophisticated examples that more concretely illustrate why it's such a powerful technique to use
- ineedasername 8y agoYes, I remember that Prolog was suppose to be good with semantic applications, but I thought Lisp was similarly (if not quite as well) suited along with being better in other respects. Though it is interesting (as I learned from another comment) that a variant of prolog is used as a database query language. It does seem like a very nice fit.
- xte 8y agoWell I (not really) "learn" for a side course just to get some extra credits (I do not know if this mechanism exists outside western EU) so... I can practically say that I only have seen it's syntax and play with it at a so ignorant level that I do not really understand it's motivations... Constraint satisfaction to my eyes seems a bit of an obscure concept that is substantially present in any functional programming language, however since prolog is still there and popup regularly I understand that it's me that miss something and so I'm curious and perhaps sooner or later I'll try to reread docs and try to really understand while keep it a bit down in my priority list...