Exponential operator

Bill Baxter wbaxter at gmail.com
Fri Aug 7 14:44:09 PDT 2009


On Fri, Aug 7, 2009 at 10:43 AM, language_fan<foo at bar.com.invalid> wrote:
> Fri, 07 Aug 2009 12:50:25 +0200, Lars T. Kyllingstad thusly wrote:
>
>> In the 'proposed syntax change' thread, Don mentioned that an
>> exponentiation operator is sorely missing from D. I couldn't agree more.
>
>> ...
>
>> "Why do we need this?" you say. "Isn't pow(a,b) good enough?" And yes,
>> pow(a,b) is just as good as mul(a,b) or div(a,b), but we don't use
>> those, do we?
>
> A lot of other built-in operators are missing. I'd like to add opGcd()
> (greatest common denominator), opFactorial (memoizing O(1)
> implementation, for advertising the terseness of D on reddit), opStar
> (has been discussed before), opSwap, opFold, opMap, and opFish (><>) to
> your list. Operations for paraconsistent logic would be nice, too. After
> all, these are operations I use quite often ==> everyone must need them
> badly.

Ha ha.  Funny jokes.  Can we call it opDarwin instead of opFish?  That
would be funnier.

--bb



More information about the Digitalmars-d mailing list