3 ms·
What I took away from this is "don't use these in an if statement." Even if I understand how the precedence is different, it isn't obvious at all. It would be b
by billybob 16y ago
What I took away from this is "don't use these in an if statement." Even if I understand how the precedence is different, it isn't obvious at all. It would be better to use more parens to make the evaluation order explicit.
The other uses shown, however, were interesting - "or" can be like a one-line if/else. If done right, I think it could be pretty clear.