5 ms·
subscripts are just adding to pointers, and since addition is commutative, then so is the subscript operator. Only pointer arithmetic has nothing to do with in
by mfukar 10y ago
subscripts are just adding to pointers, and since addition is commutative, then so is the subscript operator.
Only pointer arithmetic has nothing to do with integer arithmetic, a fact which has bitten countless people in the ass over the years.
- qwertyuiop924 10y agoNo, pointer arithmetic has a lot to do with int arithmetic. And as in int arithmetic, pointer arithmetic is commutative.
- mfukar 10y agoAlright, yes, they share a property and the syntax. I forgot we were in a programming courthouse. In the real world, treating their semantics the same misleads newbies, and leads to bugs.