DIP 1019--Named Arguments Lite--Final Review

Kagamin spam at here.lot
Tue Aug 27 15:00:04 UTC 2019


On Monday, 26 August 2019 at 22:45:16 UTC, Walter Bright wrote:
> On 8/26/2019 7:47 AM, Kagamin wrote:
>> struct S { int a, b, c, d = 7; }
>> S w = { c:1, a:1, 3 };
>> 
>> I don't even know if this result is contrived. Maybe it's 
>> trivial?
>
> It initializes to:
>
>     c = 1
>     a = 1
>     b = 3
>     d = 7

I suspect struct initializer is used only in two forms: all named 
initializers or all positional initializers, so Ada named 
arguments logic can be used for struct initializer too.


More information about the Digitalmars-d mailing list