dmd 2.063 beta 5

Dicebot m.strashun at gmail.com
Fri May 24 00:53:07 PDT 2013


I like it. A lot, probably.

When semantics of something does change it makes a lot sense to 
decouple deprecation of old behavior and introduction of new. I 
may even say it is worth using as a default approach for a 
semantics change in similar cases ;)

On Friday, 24 May 2013 at 00:01:20 UTC, Walter Bright wrote:
> On 5/23/2013 2:05 AM, Don wrote:
>> NO NO NO NO. I am violently opposed to this release.
>>
>> This beta contains the worst language misfeature of all time. 
>> It's silently
>> snuck in under the guise of a bugfix.
>
> Don has an excellent point. His case is bolstered by this 
> causing Tango2 to fail to compile with error messages that have 
> no obvious relationship with this change.
>
> Worse, as Don points out, this can result in silent breakage. 
> Not everyone writes code that is 100% tested, and shipping code 
> that no longer works would make someone justifiably very upset.
>
> The -transition=field detects such cases, but the user will not 
> necessarily know to run it.
>
> So, I agree with Don. As it is, this is unacceptable, despite 
> my agreement that it does make the language better. Therefore, 
> I propose the following addition of a warning:
>
> ------------------------------
>    const int q = 5;
>
> Warning: const field with initializer should be static or enum.
> ------------------------------
>
> Over time, this can be upgraded to a deprecation and then an 
> error.
>
> After a suitably long period of time as an error, then we can 
> allow it with the new behavior.



More information about the Digitalmars-d-announce mailing list