[DIP] In-place struct initialization

Enamex via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 3 13:43:25 PDT 2016


On Wednesday, 3 August 2016 at 20:30:07 UTC, deadalnix wrote:
> On Sunday, 31 July 2016 at 14:38:33 UTC, Lodovico Giaretta 
> wrote:
>> I support this idea of extending curly-brace initializers. It 
>> would be very useful and less ambiguous than parenthesized 
>> initializers.
>>
>
> Curly braces are already extremely overloaded. They can start a 
> block statement, a delegate literal, a struct literal and I'm 
> sure I forgot something.

Well, this extended case would fall under "struct literal". And 
personally I'm against starting function literals with just a 
brace (always use `(){...}` instead).


More information about the Digitalmars-d mailing list