Ok, fair enough, I fully agree with the standpoint.
prolog help, search, noob question
Started by asgard103, Mar 31 2009 12:06 PM
21 replies to this topic
#21
Posted 08 April 2009 - 09:22 AM
#22
Posted 08 April 2009 - 11:26 AM
In case anyone's interested, here's a great book that covers the relationship between all programming languages: Concepts, Techniques, and Models of Computer Programming. It also includes Prolog, but aside from a few examples in a narrow context it doesn't go into much detail about how to use it in the real world (phew).
The ideas behind declarative, logic and relational programming are definitely very interesting. And it makes you a better programmer in procedural languages as well because it teaches you how to convert a set of 'requirements' into procedures, in a very structured way. Usually any experienced programmer can do this automatically and eventually you learn the exact same skills, but knowing the theoretical background can save you from wasting time using hit-or-miss strategies.
Anyway, what I absolutely hate about Prolog is that it knows only one paradigm. Even when the procedural approach is trivial you're forced to think backward to turn it into logic statements. Performance is also extremely low, since really everything you do is a sort of brute-force search. The separation between the programming language and how the CPU executes things is huge.
And that's why I love multi-paradigm languages like C++. With a bit of care you can do functional programming and logic programming with it. As noted before the latter can be done using template metaprogramming, where the compiler acts as the search engine. Functional programming approaches become extremely useful when doing multi-core programming.
Personally I wouldn't teach Prolog in-depth, but a course based on the above book is definitely very valuable and a bit of attention to template meta-programming in C++ wouldn't hurt either.
The ideas behind declarative, logic and relational programming are definitely very interesting. And it makes you a better programmer in procedural languages as well because it teaches you how to convert a set of 'requirements' into procedures, in a very structured way. Usually any experienced programmer can do this automatically and eventually you learn the exact same skills, but knowing the theoretical background can save you from wasting time using hit-or-miss strategies.
Anyway, what I absolutely hate about Prolog is that it knows only one paradigm. Even when the procedural approach is trivial you're forced to think backward to turn it into logic statements. Performance is also extremely low, since really everything you do is a sort of brute-force search. The separation between the programming language and how the CPU executes things is huge.
And that's why I love multi-paradigm languages like C++. With a bit of care you can do functional programming and logic programming with it. As noted before the latter can be done using template metaprogramming, where the compiler acts as the search engine. Functional programming approaches become extremely useful when doing multi-core programming.
Personally I wouldn't teach Prolog in-depth, but a course based on the above book is definitely very valuable and a bit of attention to template meta-programming in C++ wouldn't hurt either.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












