DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion
Max Samukha
maxsamukha at gmail.com
Sat Feb 15 11:31:40 UTC 2020
On Saturday, 15 February 2020 at 08:59:44 UTC, Jacob Carlborg
wrote:
> On 2020-02-14 15:46, Steven Schveighoffer wrote:
>
>> Foo f = Foo(ber: (a: 42, b: 84)); // only valid for struct
>
> (a: 42, b: 84) looks like a tuple with named elements to me.
Exactly, a tuple-record hybrid. With Timon Gehr's tuple proposal
+ optionally named tuple elements + named parameters proposal,
various forms of struct ctor invocation may become possible: Foo
f = ((42, 84),) or Foo f = (ber: (a: 42, b: 84)) or auto f =
Foo(ber: Bar(b: 84, a: 42)), etc.
More information about the Digitalmars-d
mailing list