Re:Many programming languages have infix expressions, but ge...
by joe_the_user on Sunday January 31, 2010 @10:38PM
(#1091720)
Even in a mathematics, "a < b < c" isn't an expression but merely shorthand for "a < b" and "b < c".
The behaviour of "<" the author refers to is not associativity. Therefore, the languages he criticises do not really get associativity wrong, he just needs to brush up on his math.
Now you can say "well, ok this behaviour is not associativity but it is a well know behaviour of "<" and ">". Why can't the languages get it right?" I think the answer is that this (a<b<c<d) is one of those notations that look ok in algebra class but are really problematic if you actually try to define and use a logically consistent function notation, so it is not a problem for me, if some languages do not perform (a<b<c<d) as expected in order to keep their semantics clean.