The Gremlin, on the other hand, reads as "get friends [who know] friends where... friend is not a friend???" to me.
I also don't easily see where something should be a method and where it should be a function. Why not `order(by(valueDecr))`? Why not `select("name", count("friends"))`? Why not `where(not().within("friends"))`?
Huh. That is a good point. In Gremlin you can chain steps together (e.g. out("knows").out("mother").out("worksFor")) and you can match patterns. So, to be clearer, I should have represented the chain as a one-liner or as a two liner with an indent.
Note the "." concatenation that ties the two lines together into a chain. When nesting parallel traversals (e.g. match()), the traversal patterns are delineated by ",".
. = AND
, = OR
Ha. Thats a generally neat way to think of "." and "," in computing. mult and + ...the algebra.
Comments
In Gremlin3:
As a developer who knows neither Cypher nor Gremlin, Cypher seems much more human-readable here, in my opinion.
This easily reads as "get friends (AS FOF) [who know] friends [who know] me, where me [does not know] FOF" to me. The Gremlin, on the other hand, reads as "get friends [who know] friends where... friend is not a friend???" to me.I also don't easily see where something should be a method and where it should be a function. Why not `order(by(valueDecr))`? Why not `select("name", count("friends"))`? Why not `where(not().within("friends"))`?
Huh. That is a good point. In Gremlin you can chain steps together (e.g. out("knows").out("mother").out("worksFor")) and you can match patterns. So, to be clearer, I should have represented the chain as a one-liner or as a two liner with an indent.
OR Note the "." concatenation that ties the two lines together into a chain. When nesting parallel traversals (e.g. match()), the traversal patterns are delineated by ",". Ha. Thats a generally neat way to think of "." and "," in computing. mult and + ...the algebra.FYI in SPARQL
OR