
On Sat, Mar 15, 2014 at 9:58 AM, Robert Kern <robert.kern@gmail.com> wrote:
On Sat, Mar 15, 2014 at 2:49 PM, Charles R Harris <charlesr.harris@gmail.com> wrote:
I favor the weak right option.
1) Giving '*' higher precedence than `@` makes it easier, to my mind, to parse out what is going to happen: all the element-wise multiplications, followed by the matrix operations. I'd probably still use parenthesis for clarity.
It seems to me that 'tight' gives the same benefit. Any reasoning for the preference of 'weak' over 'tight'?
Two other reasons come to mind. First, '*' is right associative, so I think it is nicer to first view the expression as parsed into blocks separated by '@', which act somewhat like parenthesis at that point, and then evaluate the blocks. Second, and somewhat weaker, it might make it easier to track how arrays are broadcast. Chuck