DIP 1019--Named Arguments Lite--Final Review

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Fri Aug 23 19:55:31 UTC 2019


On 8/23/19 3:30 PM, Dennis wrote:
> On Friday, 23 August 2019 at 18:41:56 UTC, H. S. Teoh wrote:
>> I just don't see the benefit of going through all the trouble of the 
>> DIP process and subsequent implementation work, only to end
>> up with a half-hearted feature that doesn't even offer these
>> two most desirable things of a named argument implementation.
> 
> The current DIP has less complexity. What if you go through all the 
> trouble of implementing it only to find out some tricky edge cases you 
> didn't think about?

That's exactly why we have a process that replaces seat-of-the-pants 
language design.

> E.g. what does this code do:
> ```
> import std.stdio;
> void foo(int a, double b) {writeln("0");}
> void foo(int b, int a) {writeln("1");}
> 
> void main()
> {
>      foo(b: 10, 0);
> }
> ```
> 
> You might have an obvious intuition for this situation ("that should be 
> an error!"), but maybe there are other ones.

Good point. This is what the DIP review cycle is for.


More information about the Digitalmars-d mailing list