Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

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

Closed
thomcc opened this issue Aug 22, 2018 · 2 comments
Closed

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

thomcc opened this issue Aug 22, 2018 · 2 comments

Comments

@thomcc
Copy link
Contributor

thomcc commented Aug 22, 2018

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.

@rnewman
Copy link
Collaborator

rnewman commented Aug 23, 2018

#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.

@thomcc
Copy link
Contributor Author

thomcc commented Aug 23, 2018

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.

@thomcc thomcc closed this as completed Aug 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants