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

Walter Bright newshound2 at digitalmars.com
Wed Sep 11 23:01:32 UTC 2019


On 9/11/2019 12:18 AM, rikki cattermole wrote:
> But I need to confirm with you before I do this, is this for the replacement of 
> in place struct initialization syntax?
> 
> If so I want to solve that, but I need to ask you how you would want it done. 
> Since it touches upon .init, it makes me a little concerned because of dragons.

I'm planning to replace:

   struct S { int a, b; }

   S s = { 1, 2 };

with:

   S s = S(1, 2);

D is almost there already, but is missing the named parameter feature to go all 
the way.

I'm looking at other ways as well to unify and thereby simplify D.


More information about the Digitalmars-d mailing list