D Uniform initialization {}

Seb via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 22 18:31:47 PDT 2016


On Saturday, 22 October 2016 at 21:26:53 UTC, Patric Dexheimer 
wrote:
> S[] s = [{ 1, 2 }];
>
> Nice, did´n knew that it worked.
>
> On Friday, 21 October 2016 at 21:41:16 UTC, Daniel Kozak wrote:
>> Because there is no need. In c++ it is disaster because there 
>> is milion way how to initialize something, it is really hard 
>> to understand and inconsistent
>
> I never really felt lost about it with c++, but the argument 
> holds true anyway :)

There has been a abandoned proposal for struct initialization:
https://github.com/dlang/DIPs/pull/22


More information about the Digitalmars-d mailing list