DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion

Mathias Lang pro.mathias.lang at gmail.com
Sun Feb 16 15:24:26 UTC 2020


On Saturday, 15 February 2020 at 21:59:26 UTC, John Colvin wrote:
>
> :(
>
> I really like them and would prefer to have them do more.
>
> [...]
>
> But what I'd really love to be able to do would be this:
>
> S foo()
> {
>     return { a: 3, q: { b: 5, c: "hello" } };
> }
>
> and [...]
>

This (and the rest of the post) 100%.
The only thing that ever annoyed me about struct literals is that 
they don't work everywhere.


More information about the Digitalmars-d mailing list