4 ms·
I'm sure this is awesome, but there's no code examples until I download a read a PDF tutorial. I think a couple of examples in the README or on the homepage cou
by alexchamberlain 8y ago
I'm sure this is awesome, but there's no code examples until I download a read a PDF tutorial. I think a couple of examples in the README or on the homepage could go a long way. What differiates this from Prolog or Datalog?
- kiriakasis 8y agoMore expressive than datalog, faster than Prolog.
- lpu4o74p 8y agoHowever, less expressive than Prolog
- srean 8y agoCould you explain or point to any discussion on why would that be.
- bjz_ 8y agoMercury brings a bit more sanity to Prolog with its mode system. This is one of the key reasons why it runs fast and can be used to build big systems like Prince. That said, it _is_ a restriction on expressiveness of programs, and sometimes that makes it hard to do certain things. That's true of any type system. There's still an interesting question about whether a different iteration on the mode system could capture more of the semantics of Prolog while still being useful, but so far nobody has done that research yet. It's more trendy to do FP research these days, so I'm expecting it could be a _long_ time before we get an answer, sadly.
- bjz_ 8y ago> I'm sure this is awesome, but there's no code examples until I download a read a PDF tutorial. Yeah, I definitely think this is something that could be improved - Mercury tends to come from a more 'old-school' form of OSS where the importance of marketing and design was less well understood. I hope they get around to fixing this! The biggest thing that Mercury brings to the table is types, a mode system, and performance. This makes it viable for large scale software development.
- Avshalom 8y agoThe primary difference is that it has a strong static haskell-ish type system. Secondarily it is purely declarative (though so is datalog) and functional so no side effects and the clauses can be written/checked in any order (though it uses monads, like in Haskell to be do IO and force ordered evaluation when that's important)