opPow, opDollar

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Nov 7 08:15:11 PST 2009


Matti Niemenmaa wrote:
> Don wrote:
>> Yes, ^^ hasn't been used for exponentiation before. Fortran used ** 
>> because it had such a limited character set, but it's not really a 
>> natural choice; the more mathematically-oriented languages use ^. 
>> Obviously C-family languages don't have that possibility.
> 
> Haskell has three exponentiation operators in the standard library: ^, 
> ^^, and **. They are for non-negative integral exponents, integral 
> exponents, and floating-point exponents respectively.

I wonder whether that's an illustration of the power or of the failure 
of function overloading. (Seriously.)

Andrei



More information about the Digitalmars-d mailing list