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

Walter Bright newshound2 at digitalmars.com
Thu Feb 13 22:34:53 UTC 2020


On 2/13/2020 2:06 AM, bachmeier wrote:
> I don't oppose what's being proposed, but I do have feedback on the DIP.
> 
>> Having two equivalent means to acheive the same effect is a pointless 
>> redundancy in a language. Even worse, it engenders bikeshedding debates about 
>> which approach is "better". It's better to have one way of achieving the 
>> effect in that it reduces the complexity of the compiler, the specification, 
>> and efforts to teach the language.
> 
> That doesn't provide much motivation for removing an existing feature from the 
> language. There might be reasons to prefer one approach over the other depending 
> on what you're doing. I think it's motivated by DIP 1030, in which case that 
> should be the rationale.

Being completely redundant is a good motivation.


>> Breaking Changes and Deprecations
> 
> The only example is this:
> 
> S s = { 1, 2 }; // Deprecated: use S(1, 2) instead
> 
> That's a simple case to handle, but is every case of breakage going to be this 
> simple?

As far as I know, yes.


More information about the Digitalmars-d mailing list