What's missing to make D2 feature complete?

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 24 01:02:54 PST 2014


On Wednesday, 24 December 2014 at 08:39:26 UTC, Ola Fosheim 
Grøstad wrote:
> int myfunc(int n){
>     ...lotsofstuff...
>     x = mayormaynotchange(n);
>    ...lotsofstuff...
>    return n>0 ? x : 0;  // modified from "return x"
> }

If you require another variable for a sanitized version of `n`, 
you get confused, when to use `n` and when to use `x`, they are 
almost the same and if you pick a wrong value, the code will 
break sometimes.


More information about the Digitalmars-d mailing list