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

rikki cattermole rikki at cattermole.co.nz
Mon Feb 10 04:57:06 UTC 2020


On 10/02/2020 5:47 PM, rb3 wrote:
> On Monday, 10 February 2020 at 04:36:17 UTC, rikki cattermole wrote:
>> That is not what I suggested.
>>
>> What I suggested was given a single argument, automatically 
>> construct+call the constructor on a struct as defined in a parameter.
>>
>> It is a 1 to 1 rewrite and would be very simple to do.
> 
> That sounds like what I just described. Not sure what the difference is. 
> Anyway, there's already a PR for what I described written by Wilzbach, 
> it was opened in 2017: https://github.com/dlang/DIPs/pull/71. Is this 
> not the same as what you suggested?

I have commented on that PR.

The difference is:

1. in place struct initialization supports multiple arguments
2. and it requires extra syntax during construction
3. and finally is fully replaced by this DIP


More information about the Digitalmars-d mailing list