DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion
Steven Schveighoffer
schveiguy at gmail.com
Sat Feb 15 14:23:06 UTC 2020
On 2/14/20 6:44 PM, Walter Bright wrote:
> On 2/14/2020 2:11 PM, Steven Schveighoffer wrote:
>> ... // some many lines later
>
> It can be done inline with lambdas, like dmd itself does:
>
> https://github.com/dlang/dmd/blob/master/src/dmd/backend/oper.d#L387
>
> and the lambdas can be arbitrarily complex. I wrote those bits to
> replace the optabgen.d program.
Not sure what this is supposed to mean. I hope not:
auto moves = Moves!double(items: [(){return Vector2d!double(x: 1, y: 0);
}(), ...])
-Steve
More information about the Digitalmars-d
mailing list