March 15, 2014
12:06 p.m.
On Sun, 16 Mar 2014 00:55:09 +1300 Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
Antoine Pitrou wrote:
The possible reason given in the PEP is very weak and amounts to premature optimization:
I don't think it's just a matter of optimization. Often, matrix @ vector represents a linear operator acting on an element of a vector space. When you chain them,
A @ B @ C @ v
conceptually represents acting on v with C, then B, then A.
It can just as well represent "acting" on v with (A @ B @ C). Of course, mathematically it shouldn't make a difference, but in computer programming right-associative operators are always a special case, and therefore an additional cognitive burden. Regards Antoine.