Pre: Prefer [(pred ...)] to [[pred ...]] syntax.

This is a style choice.  We supported both, perhaps for Datomic
compliance, but it's not the standard we use in our code base.  In
addition, it doesn't read like lisp (which is what EDN is copying),
since [] is not function application in most lisps.

It's also a convenience: I don't want to parse brackets that have to
agree with `rust-peg`.  It's not hard but it's also not worth doing.
This commit is contained in:
Nick Alexander 2018-05-31 11:33:03 -07:00
parent 47a0f40cce
commit 3cc8b4fd24
2 changed files with 2 additions and 2 deletions

View file

@ -338,7 +338,7 @@ mod testing {
[:find ?x ?age
:where
[?x :foo/age ?age]
[[< ?age 30]]
[(< ?age 30)]
(not [?x :foo/knows "John"]
[?x :foo/knows "Daphne"])]"#;
let cc = alg(&schema, query);

View file

@ -973,7 +973,7 @@ mod testing {
[:find ?x ?age
:where
[?x :foo/age ?age]
[[< ?age 30]]
[(< ?age 30)]
(or [?x :foo/knows "John"]
[?x :foo/knows "Daphne"])]"#;
let cc = alg(known, query);