I find the precedence in Blitz to be the single most annoying 'feature' of operators.
By long tradition multiplication has higher precedence than addition. AND,OR are the logical analogs of Multiplication,Addition. In fact, they are often called logical product and logical sum.
Here is one obvious correspondence. Write out the multiplication table for the values 0,1. Then do the same for AND. You will notice the tables are identical.
This is why the C-style rules are consistent and reasonable:
Multiplication has higher precedence than Addition.
Logical And has higher precedence than Logical Or.
Bitwise And has higher precedence than Bitwise Or.
The Blitz approach, giving AND/OR the same precedence, is just wrong.
By long tradition multiplication has higher precedence than addition. AND,OR are the logical analogs of Multiplication,Addition. In fact, they are often called logical product and logical sum.
Here is one obvious correspondence. Write out the multiplication table for the values 0,1. Then do the same for AND. You will notice the tables are identical.
This is why the C-style rules are consistent and reasonable:
Multiplication has higher precedence than Addition.
Logical And has higher precedence than Logical Or.
Bitwise And has higher precedence than Bitwise Or.
The Blitz approach, giving AND/OR the same precedence, is just wrong.