I’ve written quite a bit of Mercury for fun, and I think it’s a great language. It feels more like writing in a statically-typed functional language (like OCaml) than a logic language like Prolog, despite the syntax and presence of relations. I’d love to see more people and companies adopt it; it’s a shame how important technology popularity is for most companies.
Anything, web servers, systems programming, video games, etc. Its more of a different way of programming and thinking, using logic variables and unification to solve problems. Once you wrap your head around logic programming, its pretty easy and very powerful.
Mercury's selling poings are:
- runtime performance (automatic parallelization, very efficient due to logic programming understanding and rewriting sequenced operations)
- static typing (in an ml style / like OCaml)
- logic programming (unification of lvars)
As a language it fills an interesting niche as logic progamming language typically aren't dyanmically typed or high performance (ie Prolog, most miniKanren implementations).
Mercury is great at basically the same problems you would solve with Prolog, but has added purity markers that help your code not have exponential slowdowns caused by hard to discover bugs.