Re: 7.0 wishlist?



Harold Yarmouth wrote:
Joshua Cranmer wrote:
((array[i++] << 8) & 0xff) | (array[i++] & 0xff)

That is side effects.

That is bit-twiddling, not matrix multiplication.

It is very much the same vein. Face it: expressions can, and will, have side effects. Even if addition is commutative in mathematics, you can't assume it's true in computer science.

In fact, that is the kind of code I used to fire people for writing in C, before I decided that I preferred programming to managing programmers and went back to basics.

Well, its outcome is undefined in C since when i is incremented is unspecified.

--
Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
.