DIP 1019--Named Arguments Lite--Final Review
Dennis
dkorpel at gmail.com
Fri Aug 23 19:30:40 UTC 2019
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? 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.
More information about the Digitalmars-d
mailing list