DIP 1030--Named Arguments--Community Review Round 1 Discussion
Timon Gehr
timon.gehr at gmx.ch
Tue Feb 11 08:49:43 UTC 2020
On 09.02.20 21:59, Walter Bright wrote:
> On 2/9/2020 11:51 AM, Arine wrote:
>> struct A {
>> int foo;
>> }
>>
>> struct A {
>> int bar; // renamed from foo
>> deprecated alias foo = bar;
>> };
>>
>>
>> False equivalency, you have many tools at your disposal to deal with
>> this for structs.
>
>
> C has it, too. Never heard a single complaint about it, either.
>
> https://en.cppreference.com/w/c/language/struct_initialization
If you change the name of a field, code that accesses the field in the
standard way also breaks. It would be rather weird if people complained
specifically about broken initializers.
More information about the Digitalmars-d
mailing list