4 ms·
Thanks. Is Datomic also a dialect of Prolog then?
by bogomipz 4y ago
Thanks. Is Datomic also a dialect of Prolog then?
- cmrdporcupine 4y agoNo, and I wouldn't call Datalog a dialect of Prolog either necessarily. It's more like, classic Datalog syntax looks Prolog-ish (similar syntax, and is kind of a subset of Prolog). And you can do Datalog-type stuff in Prolog. But from what I've read of Datomic it's got a totally different syntax, but similar semantics to Datalog .. but not Prolog... Basically, Prolog can do more than Datalog. Datalog is like, some subset of concepts of Prolog, but specialized for relational data queries, so it can achieve some optimizations and focus on data retrieval only. Is that confusing enough?
- dragonwriter 4y ago> No, and I wouldn’t call Datalog a dialect of Prolog either necessarily. It’s more like, classic Datalog syntax looks Prolog-ish (similar syntax, and is kind of a subset of Prolog). Datalog originated specifically as a restricted subset of Prolog, which is why the “classic” syntax looks prolog-ish. > Basically, Prolog can do more than Datalog. Datalog is like, some subset of concepts of Prolog, but specialized for relational data queries, so it can achieve some optimizations and focus on data retrieval only. Datalog is a purely declarative, non-Turing complete subset of Prolog, removing the imperative features and assuring termination. This gives up lots of power, obviously, but it also, well, provides a termination guarantee. Removing imperative features (cut) from Prolog also means that Datalog implementations can use different (or multiple, switchable) strategies, while differing in what kinds of data sets and queries they perform well on, not correctness.
- refset 4y ago> Datalog implementations can use different (or multiple, switchable) strategies Including distributed strategies, as seen in Bloom http://boom.cs.berkeley.edu/ http://boom.cs.berkeley.edu/
- anon291 4y agoAs others have said, datalog arose as a dialect of prolog that removed turing-completeness and expressivity, thus guaranteeing termination.