3 ms·
How is this a better alternative? A major attraction of Prolog is that one can remove almost arbitrary parts of any pure program and still infer useful conclus
by triska 6y ago
How is this a better alternative?
A major attraction of Prolog is that one can remove almost arbitrary parts of any pure program and still infer useful conclusions that hold for the original program. For example, one can remove a clause and thereby make the program more specific. One can remove a goal and thus make the program more general.
This is possible due to the way the language is designed, the interplay of syntax and semantics enables this. The program fragments serve as explanations that can be shown to programmers to pinpoint mistakes in the code. Thus, when narrowing down mistakes, it becomes possible to focus on smaller portions of the code that are therefore easier to understand.
- iso8859-1 6y agoWhy wouldn't that be the case for e.g. LogicT? Prolog is _larger_ than LogicT. It is the additional syntax and runtime system in a custom Prolog implementation that needs to be defended, not the lack of it!
- qart 6y agoI meant "better" in the sense that one can do logic programming from whatever language one is familiar with already, instead of installing and learning a whole new ecosystem. We would still have to learn logic programming.
- YeGoblynQueenne 6y ago>> For example, one can remove a clause and thereby make the program more specific. One can remove a goal and thus make the program more general. Woa. I'm pretty sure that the subsumption order and the implication order are not common knowledge among Prolog programmers. Have you been reading Plotkin by any chance? :)