a**b exponentiation
Bill Baxter
dnewsgroup at billbaxter.com
Tue Jul 3 23:21:08 PDT 2007
Leandro Lucarella wrote:
> davidb, el 3 de julio a las 20:33 me escribiste:
>>>> And I rather like the other proposed operator: ^^
>>>> Should be more clear, and more familiar since some languages already use '^' to mean power -- so
>>>> long as it doesn't get confused with our existing '^' operator...
>>> I also like "^^", but "**" does have some history - I think it is used in FORTRAN.
>> Gnuplot uses "**" as well.
>
> And Python.
>
I kinda like ^^, because it looks like the smiley faces Japanese folks
make instead of the sideways things...
But logic and consistency kinda dictates that ^^ should be logical xor
since we have:
& - bitwise and && - logical and
| - bitwise or || - logical or
^ - bitwise xor ^^ - ??
whereas ** is like "multiply-multiplied" which is sort of what
exponentiation is.
--bb
More information about the Digitalmars-d
mailing list