DIP 1019--Named Arguments Lite--Final Review
a11e99z
black80 at bk.ru
Sat Aug 24 05:00:06 UTC 2019
On Saturday, 24 August 2019 at 01:43:31 UTC, Newbie2019 wrote:
> On Saturday, 24 August 2019 at 01:26:48 UTC, H. S. Teoh wrote:
>> Without these two primary benefits, it's hard for me to
>> imagine how this DIP could pull its own weight. It's like
>> promising to cook chicken pot pie, but when the dish arrives
>> there's only pie and no chicken. Who would pay for that?
>
>
> I agree.
>
> Without reordered and skipping default, I consider
> in-place-inited struct is more useful then this DIP.
struct is only one entity, so compiler knows what exactly
initialized
but function can be overloaded
so which one should be called in sample below?
import std.stdio;
void foo(int a, int b) {writeln("0");}
void foo(int b, double a) {writeln("1");}
void main()
{
foo(b: 10, 0);
}
More information about the Digitalmars-d
mailing list