4 ms·
I would write these as a = b = (c == d) and a = (b == c == d) respectively. And I think it would make sense to have a syntax rule that strictly enfo
by tom_mellior 9y ago
I would write these as
a = b = (c == d)
and
a = (b == c == d)
respectively. And I think it would make sense to have a syntax rule that strictly enforces parentheses around truthy expressions used in such contexts.
- icebraining 9y agoRight, but then you're using the parentheses to distinguish the assignment from the comparison, it's not just a matter of not allowing expressions as statements.