2 ms·
> specify how exactly in which order the calculations need to be made There is a language called Mercury that is an extension of a subset of Prolog, i.e., it t
by tom_mellior 9y ago
> specify how exactly in which order the calculations need to be made
There is a language called Mercury that is an extension of a subset of Prolog, i.e., it takes some useful Prolog stuff away but adds some other useful stuff of its own. One of its additions is a mode system; essentially, a simple way to declare how you intend to use your predicates. You can then write your program once, putting the goals in clauses in any order, and the Mercury compiler will use the mode system to figure out all possible data flows and generate specialized, optimized code for each of them.
I like a lot of Mercury's ideas, but as a Prolog fan I find it does throw some things out that I rather like. If you're less attached to Prolog, you might like Mercury more :-)