
12 Apr
2019
12 Apr
'19
3:15 p.m.
Am 12.04.19 um 11:21 schrieb Richard O'Keefe:
It has never been the case that all operators in all programming languages were left associative. For addition and subtraction it matters; you don't want a-b+c interpreted as a-(b+c), but not for || and not for &&. My expectation is that these operators should be right associative.
What is the basis for this expectation? My expectation would be left associativity, just because I read stuff from left to right, and left associativity is what I get if I mentally parse from left to right. So I'm curious what thought process arrives at the opposite expectation. Regards, Jo