Exponentiation operator precedence
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
> > 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.
> es-discuss mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss