DIP 1020--Named Parameters--Community Review Round 2

a11e99z black80 at bk.ru
Tue Sep 10 13:27:54 UTC 2019


On Tuesday, 10 September 2019 at 12:37:27 UTC, rikki cattermole 
wrote:
> On 10/09/2019 11:51 PM, SashaGreat wrote:

I have addition:

@named("arg") should accept string as named param name:
when arg is absent - use real param name
when arg is exists - use "arg" as param name for named param 
(phew!)

void func( @named("longBeautyName") int val ) {
   // I can use "val" here
   someGlobal = val;
}

// but when u use named param u should set longBeautyName
func( longBeautyName: 123 );



More information about the Digitalmars-d mailing list