3 ms·
> 2. Commutativity. Order of predicates does not change the result. Finally, true logic programming! I'm not sure this is a good selling point. The fact that p
by oldsecondhand 3y ago
> 2. Commutativity. Order of predicates does not change the result. Finally, true logic programming!
I'm not sure this is a good selling point. The fact that predicate order matters in Prolog allows performance optimization and more transparent debugging.
- simplify 3y agoIt's a great one! From a logical perspective, it's ideal for the order of constraints to not affect the outcome. This missing behavior becomes a quirk quite early on when working with Prolog. That said, order of constraints can affect performance. But since reordering doesn't affect outcome, you are free resort them as you wish in effort to optimize for better performance :)