Please rid me of this goto

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 24 08:11:10 PDT 2016


On 06/24/2016 10:03 AM, Kagamin wrote:
> On Thursday, 23 June 2016 at 23:33:46 UTC, Timon Gehr wrote:
>> I don't want to argue this at all. x^^0 is an empty product no matter
>> what set I choose x and 0 from. 0^^0 = 1 is the only reasonable
>> convention, and this is absolutely painfully obvious from where I
>> stand. What context are you using 'pow' in that would suggest otherwise?
>
> You can build a non-analytical flavor of pow on top of the analytical
> flavor:
> int pow1(int x, int y)
> {
>    if(x==0 && y==0)return 1;
>    return pow(x,y);
> }

Apparently that's what powr/pow do? -- Andrei


More information about the Digitalmars-d mailing list