lookup-ref syntax is different between Mentat and Datomic #18

Open
opened 2020-08-06 15:04:53 +00:00 by gburd · 3 comments
gburd commented 2020-08-06 15:04:53 +00:00 (Migrated from github.com)

This doesn't seem to be documented anywhere (or maybe I'm misread the datomic docs?), but is probably worth mentioning somwhere.

According to https://docs.datomic.com/on-prem/identity.html and http://blog.datomic.com/2014/02/datomic-lookup-refs.html Datomic does them as [:namespace/attr value], whereas we do it as (lookup-ref :namespace/attr value).

I'm filing an issue rather than just updating https://github.com/mozilla/mentat/wiki/Differences-from-Datomic because i'm actually not 100% certain it's not me misreading the datomic docs, or failing to interpret what we do.

Original by @thomcc

This doesn't seem to be documented anywhere (or maybe I'm misread the datomic docs?), but is probably worth mentioning somwhere. According to https://docs.datomic.com/on-prem/identity.html and http://blog.datomic.com/2014/02/datomic-lookup-refs.html Datomic does them as `[:namespace/attr value]`, whereas we do it as `(lookup-ref :namespace/attr value)`. I'm filing an issue rather than just updating https://github.com/mozilla/mentat/wiki/Differences-from-Datomic because i'm actually not 100% certain it's not me misreading the datomic docs, or failing to interpret what we do. Original by @thomcc
gburd commented 2020-08-06 15:04:55 +00:00 (Migrated from github.com)

#666, #392. The use of (lookup-ref …) is to eliminate ambiguity, and that's discussed in those tickets. Datomic isn't very well documented, and implementing Mentat in Rust exposed a number of the ambiguities that Clojure glosses over.

Original by @rnewman

#666, #392. The use of `(lookup-ref …)` is to eliminate ambiguity, and that's discussed in those tickets. Datomic isn't very well documented, and implementing Mentat in Rust exposed a number of the ambiguities that Clojure glosses over. Original by @rnewman
gburd commented 2020-08-06 15:04:55 +00:00 (Migrated from github.com)

Yeah, I can see that it avoids some syntactic ambiguity. I've documented it on the wiki even though there's an issue open to fix it.

Original by @thomcc

Yeah, I can see that it avoids some syntactic ambiguity. I've documented it on the wiki even though there's an issue open to fix it. Original by @thomcc
pingiun commented 2022-08-27 16:30:22 +00:00 (Migrated from github.com)

This issue should probably be closed because 903ac24589 was added?

This issue should probably be closed because https://github.com/qpdb/mentat/commit/903ac2458995edda6f6040a3cf0d99ee83f3d00b was added?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#18
No description provided.