DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion
aliak
something at something.com
Fri Feb 14 22:04:55 UTC 2020
On Friday, 14 February 2020 at 14:46:43 UTC, Steven Schveighoffer
wrote:
>
> I can think of a solution though, just have a substitute for
> the real name of the type for struct initializers. In other
> words, this is not a function call, and does not have possible
> overloads. Something like:
>
> Foo f = Foo(ber: auto(a: 42, b: 84));
>
> It's not as terse, but circumvents for the most part the issue
> of long names.
>
I really like that.
I just got a glimpse of Andre's issue [0] and deprecating brace
initialization really is going to put a big blotch on that code
of his. And the workaround suggested looks really bad :(
Especially considering the file is long, the number of AWS types
are HUGE and having aliases like
alias A = AnAwsType
alias B = AnotherAwsType
.
.
.
/// Really not scalable...
[0] https://github.com/dlang/DIPs/pull/169#issuecomment-532830320
More information about the Digitalmars-d
mailing list