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

Steven Schveighoffer schveiguy at gmail.com
Sat Feb 15 15:17:30 UTC 2020


On 2/15/20 10:03 AM, rikki cattermole wrote:
> On 16/02/2020 3:39 AM, Steven Schveighoffer wrote:
>> On 2/14/20 11:50 PM, Walter Bright wrote:
>>> On 2/14/2020 7:59 PM, jxel wrote:
>>>> ... greatly complicating ...
>>>
>>> I know that n.g. discussions have a tendency to defend to the death a 
>>> single stone and forget the quarry, but come on.
>>
>>  From the perspective of the user, the complications in the compiler 
>> or library are of zero significance. They care about what they have to 
>> write to get what they want, and how that code performs.
>>
>> In other words, they are not even in the quarry, but in the processing 
>> plant (or whatever you call the place the stones go after they are 
>> harvested).
>>
> 
> Except when the compiler ICE's out, they certainly care then.

Sure, but it doesn't. brace-initializers have been in the language from 
the beginning and they are a proven feature.

> Compiler errors are to be expected when you don't have a full time team 
> working on a compilers internal.

In general having the compiler simpler means an easier-to-maintain 
compiler. But simplifying the language to remove already working and 
proven features isn't progress. Unless you give them a new feature that 
replaces it (which could happen, if we wanted it to).

> You can talk about quarries and processing plants but either the 
> customer gets the exact product they want in the time that they have 
> paid for or they don't.

I think we are saying the same thing. The user only cares if it works, 
not how hard it was to implement. If it works as expected, and is bug 
free (it currently is), then to the user, removing it means losing the 
feature. It doesn't mean a less buggy compiler.

It the brace initializers were riddled with bugs or design issues, then 
I can see a benefit for users. This isn't the case. Removing features 
has to have a better story than simplification of language.

We could simplify foreach and for loops into just while loops. The 
language would be simpler and less surface area for mistakes. But the 
users would be not very happy about such a change.

-Steve


More information about the Digitalmars-d mailing list