Hello! I found a few previous threads about the sc...
# spicedb
a
Hello! I found a few previous threads about the schema operation precedence in this channel, but I'm still somewhat confused. If I understand correctly, the actual operator precedence is such that
aaa - bbb & ccc + ddd
is equivalent to
aaa - (bbb & (ccc + ddd))
. In other words, "+" has the highest priority and "-" the lowest. I'd say, that this is rather counter-intuitive and based on some earlier answers and on this line here https://github.com/authzed/spicedb/blob/main/pkg/schemadsl/parser/parser.go#L441 , I can assume that this was unintentional, and the precedence was meant to be the opposite of what it actually is. In any case, documenting the actual state of things and maybe adding a recommendation that parenthesis are always used would be very helpful.