Well, after looking at this, I would say it's more of a matter of opinion on what the order of operations are. We can take that complicated equation and boil it down to 32&0^16-~7-24
I don't think there is a standard order to follow. I think python chooses to follow through in a way where the mathematical answer is 0.
This output is 0 on my computer using C++ also. So why was this a huge debate?
I think what he means is the order of operations is not well-defined across languages. C++'s order of operations is, in some instances, arbitrary, and even wrong.
I can never keep them straight across languages, and so I apply parentheses liberally.
IIRC Dennis Ritchie once said that he wished he'd made & have a higher precedence than == so you wouldn't have to use parentheses to test for bit flags. Is that what you mean by wrong?
I think the matrix multiplication notation is wrong. It really ought to be that x * M1 * M2 == f_M2(f_M1(x)). But then, it really ought to be ((x)f_M1)f_M2. Wow, that looks weird.
I'm not sure what you are saying about matrix multiplication. Are you referring to a specific C++ library? And I'm not sure I understand your notation... order matters in matrix multiplication (AB != BA), but it does not matter whether you perform AB first or BC first in ABC. (That is, matrix multiplication is not commutative, but it is associative.)
You know this, so I am confused by what you are trying to say.
Sorry, I should have made it clearer.
In the context of mathematical notation, I'm saying the order of matrix multiplication notation should be inverted, with the transformation that's performed later appearing more to the right, not more to the left, and the same for function application notation.
Just a little bit.
That multiplication is associative is orthogonal to the matter of the order of notation. What you're saying is correct, but irrelevant.
Uh, I wouldn't say it is orthogonal -- associativity and notation go hand in hand -- unless you are referring to some notation where associativity is indicated in some other way?
I admit I don't know of any other notation for matrices than A to represent something like
┌ ┐
│ 1 2 3 │
│ 4 5 6 │
└ ┘
You can turn vectors and use parentheses (or angle brackets or whatever the mathematician is smoking), but they are just 1D matrices.
I think you mean that "the way associativity is stated goes hand in hand with notation". Yes, "(BA)k == B(Ak)" and "k(AB) == (kA)B" are different strings of symbols that are only meaningful in their respective notations, but they both describe the same property of matrix multiplication.