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

Alex sascha.orlov at gmail.com
Sun Feb 17 17:58:39 UTC 2019


On Sunday, 17 February 2019 at 17:48:33 UTC, 12345swordy wrote:
> On Sunday, 17 February 2019 at 17:09:57 UTC, Yuxuan Shui wrote:
>> And they have the problem that the name of the parameter 
>> becomes part of the API. This is something this DIP tries to 
>> solve.
> A better solution would be allowing nameless parameters 
> functions and refer the parameters by index.
>
> -Alex

This possibility exists already via variadic templates and via

´´´
void main()
{
     fun(4, "kuku");
}

void fun(int, string)
{
     import std.stdio;
     writeln(_param_0);
     writeln(_param_1);
}
´´´


More information about the Digitalmars-d mailing list