Should ^^ (opPow) be left- or right-associative?

bearophile bearophileHUGS at lycos.com
Sat Dec 5 09:57:34 PST 2009


KennyTM~:
> But the mathematical convention is a^b^c == a^(b^c).
> Languages which the power operator is right-associative (3^3^3==7e12):
>   - Python, Haskell, Ruby, Perl, Mathematica, Bash.

Doing things as in mathematical convention, Mathematica and Python sounds better.
This was just the release V.0.1 of the built-in pow, it needs several improvements :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list