Will D ever get optional named parameters?

via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 15 04:21:43 PDT 2014


On Tuesday, 14 October 2014 at 21:21:23 UTC, 岩倉 澪 wrote:
> Something like:
> void foo(int a = 42, int b = 0){}
> foo(@default, 7); //rewritten to foo(42, 7);

It is useful to have "_" mean "I don't care" when you have 
tuples. So you would then write:

"foo( _ , 7 )" and " _,y = get_point()"




More information about the Digitalmars-d mailing list