I guess as long as I'm on the subject of Mercury, I should comment on why it's a language worth studying. :-)
First, it provides mechanisms for making logic programming more efficient. More specifically, Mercury provides a method for declaring the relatively determinism of the predicates (det, semi-det, and non-det). This allows the compiler to optimize the generated code in the scenario of determinism. Note, Prolog compiles all statements with the default of non-determinism, thus having the added overhead of pursuing various multiple solutions (or no solutions).
Second, Mercury makes for a happy marriage between logic and functional programming. Although most functional languages (like Scheme) can mimic the logic languages, it's not necessarily natural nor intuitive. Though Mercury is really a pure logic language, the authors of the language have found a way to use functional techniques in way that compiles to pure logic techniques. If you are interested in the relationship between the two paradigms, Mercury is perhaps the best answer to the interrelationship between declarative and functional programming.
|