Optional arguments/parameters

Wanderer via Digitalmars-d digitalmars-d at puremagic.com
Wed May 28 04:54:28 PDT 2014


Java misses this feature badly, forcing programmers to copy-paste 
bloated code (constructor A calls constructor B with fewer 
arguments, constructor B calls constructor C etc, same thing with 
methods). Please tell me, does D support this feature?

int myNiceFunc(double a, double b=0, int c=0) {...}

auto n = myNiceFunc(100);


More information about the Digitalmars-d mailing list