On Mon, Mar 17, 2014 at 8:37 PM, Russell E. Owen <ro...@uw.edu> wrote: > After seeing all the traffic on this thread, I am in favor of > "same-left" because it is easiest to remember: > - It introduces no new rules. > - It is unambiguous. If we pick option 2 or 3 we have no strong reason > to favor one over the other, leaving users to guess. > > To my mind, being able to easily reason about code you are reading is > more important that hoping to increase efficiency for one common case > when not using parenthesis.
Personally I'm leaning in a similar direction (at least as far as left- versus right-associativity goes; I'm not sure yet what I think about the magic "grouping" thing I just posted :-)). The more I think about it, the weaker I find the avoiding-parentheses argument. If you're going to take the trouble to think about which ordering is best, you should write that down with parentheses no matter what the associativity is, so that when I have to read your code I'll see the parentheses and know that you thought about it! And certainly the slow part of this is not typing the parentheses, it's figuring out what order is best. (The potential advantage of "grouping" isn't that you don't have to write as many parentheses, it's that you don't have to *think* about parentheses.) The fact that Matlab et al get along fine with same-left also strikes me as strong evidence that right-associativity's benefits are at least not overwhelmingly compelling... -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion