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:
parent
47a0f40cce
commit
3cc8b4fd24
2 changed files with 2 additions and 2 deletions
|
@ -338,7 +338,7 @@ mod testing {
|
||||||
[:find ?x ?age
|
[:find ?x ?age
|
||||||
:where
|
:where
|
||||||
[?x :foo/age ?age]
|
[?x :foo/age ?age]
|
||||||
[[< ?age 30]]
|
[(< ?age 30)]
|
||||||
(not [?x :foo/knows "John"]
|
(not [?x :foo/knows "John"]
|
||||||
[?x :foo/knows "Daphne"])]"#;
|
[?x :foo/knows "Daphne"])]"#;
|
||||||
let cc = alg(&schema, query);
|
let cc = alg(&schema, query);
|
||||||
|
|
|
@ -973,7 +973,7 @@ mod testing {
|
||||||
[:find ?x ?age
|
[:find ?x ?age
|
||||||
:where
|
:where
|
||||||
[?x :foo/age ?age]
|
[?x :foo/age ?age]
|
||||||
[[< ?age 30]]
|
[(< ?age 30)]
|
||||||
(or [?x :foo/knows "John"]
|
(or [?x :foo/knows "John"]
|
||||||
[?x :foo/knows "Daphne"])]"#;
|
[?x :foo/knows "Daphne"])]"#;
|
||||||
let cc = alg(known, query);
|
let cc = alg(known, query);
|
||||||
|
|
Loading…
Reference in a new issue