4 ms·
The gotcha is that the operation is commutative on type system level. C could - as many languages do - restrict the type of the left operand of [] to "something
by int_19h 6y ago
The gotcha is that the operation is commutative on type system level. C could - as many languages do - restrict the type of the left operand of [] to "something indexable".
- mlyle 6y agoOh, sure, I'm not arguing that 0[a] isn't "weird". I just don't think it's an example of multiple ways to do something.