A nice way to step into 2012
Marco Leise
Marco.Leise at gmx.de
Wed Dec 28 05:18:36 PST 2011
Am 28.12.2011, 01:22 Uhr, schrieb Jonathan M Davis <jmdavisProg at gmx.com>:
> On Tuesday, December 27, 2011 18:43:14 Andrej Mitrovic wrote:
>> Wouldn't it be great if Santa were to give us named arguments this year
>> too?
>> :)
>
> Only if he hates me. But I guess that I'm in the minority around here in
> that
> I hate the idea of named arguments.
>
> - Jonathan M Davis
Despite that feature being optional to use, I could understand you if you
think it only makes sense on obscure 'true'/'false' flags and prefer named
enums there. Then there would be two ways to do the same thing, which
annoys language purists like me ^^.
(…, overwrite = true); vs. (…, CreateMode.overwrite);
But named parameters can do more, like skipping some optional parameters
and using others.
int foo(int a = 0, int b = 1, int c = 2) {}
foo(c = 3);
More information about the Digitalmars-d
mailing list