Named parameters
tcak via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 24 10:15:02 PDT 2015
On Friday, 24 July 2015 at 14:34:12 UTC, Chris wrote:
> On Friday, 24 July 2015 at 14:15:11 UTC, Shammah Chancellor
> wrote:
>> Since D has optional arguments -- why don't we support named
>> parameters? There are extremely handy and work beautifully in
>> languages like C#.
>
> Here's a thread that dealt with this question:
>
> http://forum.dlang.org/post/m1g3kb$njo$1@digitalmars.com
Okay, understood that wrong ordered named parameters might create
overloading problem, but why skipping parameters is not allowed,
I don't get that one though.
[code]
void test(int a=5, int b){
}
test( , 7 );
[/code]
Programmer should still be forced to provide all parameters in
correct order. How would this create a problem I can't see.
More information about the Digitalmars-d
mailing list