Exponentiation operator precedence

Alexander Jones alex at weej.com
Wed Aug 26 21:17:52 UTC 2015

Exponentiation is written in conventional mathematics as if it were a
postfix unary operator, parameterised by a value written in superscript.
IMO this puts it in a whole different class to binary operators where both
operands are written equally. I don't see a ** b ** c as a good reflection
of mathematical convention.

Number.prototype.pow, on the other hand, would be fine.

On Wednesday, August 26, 2015, Jason Orendorff <jason.orendorff at gmail.com>

> On Wed, Aug 26, 2015 at 1:03 PM, Thomas <thomasjamesfoster at bigpond.com
> <javascript:;>> wrote:
> > There's still the issue of exponentiation being right-associative.
> Unless ** becomes an operator which behaves differently as to how it would
> in a high school maths class, we're at an impasse.
> I'm not sure I follow. Exponentiation is right-associative in math, in
> the current ** proposal, and in every suggested update to it.
> -j
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org <javascript:;>
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150826/bee59efa/attachment.html>

More information about the es-discuss mailing list