Exponentiation operator precedence

Mark S. Miller erights at google.com
Wed Aug 26 16:09:22 UTC 2015

I don't get it. The conflict between

* the history of ** in other languages,
* the general pattern that unary binds tighter than binary

seems unresolvable. By the first bullet, -2 ** 2 would be -4. By the
second, it would be 4. Either answer will surprise too many programmers. By
contrast, no one is confused by either -Math.pow(2, 2) or Math.pow(-2, 2).

On Wed, Aug 26, 2015 at 9:00 AM, Jason Orendorff <jason.orendorff at gmail.com>

> On Tue, Aug 25, 2015 at 5:43 PM, Mark S. Miller <erights at google.com>
> wrote:
> > When the costs were minor, it was ok that the benefits were minor.
> The costs will probably still be minor if we just let Rick look at it
> and revise the proposal.
> What has happened here is
> - upon implementing the feature, we noticed a problem
> - we thought through it together and found possible solutions
> - we found other languages already use these solutions
> This seems like less turbulence than average for a new ES feature,
> even a minor one. Considering dropping the feature seems premature.
> -j

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150826/d5708df7/attachment-0001.html>

More information about the es-discuss mailing list