DIP 1019--Named Arguments Lite--Community Review Round 1

Rubn where at is.this
Fri Feb 15 22:48:52 UTC 2019


On Friday, 15 February 2019 at 12:56:45 UTC, Mike Parker wrote:
> This is the feedback thread for the first round of Community 
> Review for DIP 1019, "Named Arguments Lite":
>
> https://github.com/dlang/DIPs/blob/23ef47a94e0fdd5ddc4b2f6b2f4dcfd3c1f43aa6/DIPs/DIP1019.md
>
> All review-related feedback on and discussion of the DIP should 
> occur in this thread. The review period will end at 11:59 PM ET 
> on March 1, or when I make a post declaring it complete.
>
> At the end of Round 1, if further review is deemed necessary, 
> the DIP will be scheduled for another round of Community 
> Review. Otherwise, it will be queued for the Final Review and 
> Formal Assessment by the language maintainers.
>
> Please familiarize yourself with the documentation for the 
> Community Review before participating.
>
> https://github.com/dlang/DIPs/blob/master/PROCEDURE.md#community-review
>
> Thanks in advance to all who participate.

drawRect(x: 0, y: 0, width: 1, height: 1);
drawRect(width: 1, height: 1, x: 0, y: 0);

The DIP doesn't state what order these are executed in. The spec 
states parameters are executed left to right. When you can 
rearrange the function arguments at the call site, is it going to 
call left to right as it is orangized at the call site, or left 
to right as according to as the function definition?

I don't think we should require an attribute for this either. We 
already have enough we don't need one more.

It means we can't use it for instances where you want to change a 
default value but keep other options at their default much like 
how C# implements it:

void foo( int bar, int someDefault = 0, int someOtherDefault = 1 
);
foo( 10, someOtherDefault: 2 );


More information about the Digitalmars-d mailing list