DIP 1030--Named Arguments--Community Review Round 1 Feedback

Jacob Carlborg doob at me.com
Fri Feb 7 09:26:53 UTC 2020


On Thursday, 6 February 2020 at 20:31:15 UTC, Walter Bright wrote:
> On 2/6/2020 3:29 AM, Basile B. wrote:
>> What are the semantics on functions without named parameters ?
>
> They don't have names, so any attempt to apply a name to them 
> would be "no match".

They do have a compiler generated names that are accessible. This 
compiles:

void foo(int)
{
     assert(_param_0 == 3);
}

void main()
{
     foo(3);
     foo(_param_0: 3); // would this compile?
}

--
/Jacob Carlborg


More information about the Digitalmars-d mailing list