Final by default?

Brian Rogoff brogoff at gmail.com
Thu Mar 13 07:59:21 PDT 2014


On Thursday, 13 March 2014 at 12:01:15 UTC, Daniel Murphy wrote:
> "Don"  wrote in message 
> news:ekymfpqyxasvelcixrjp at forum.dlang.org...
>
>> I agree completely.
>>
>> Some things that really should be fixed, don't get fixed 
>> because of a paranoid fear of breaking code. And this tends to 
>> happen with the issues that can give nice warning messages and 
>> are easy to fix...
>
> As usual I agree with every single thing in this post, and 
> Sean's. Regressions are bad but have nothing to do with using 
> slow, controlled deprecation to make the language better.

It might be worthwhile to consider a compiler switch which would 
require forced virtual/final annotations on all methods as per

https://d.puremagic.com/issues/show_bug.cgi?id=11616#c4

While code compiled with such a switch would be a bit more 
verbose, it would ensure that programmers were careful with 
virtual. It was a good transition plan, and the idea has value 
even if the final by default is delayed or abandoned.

I'd like to see final by default in D rather than it's successor. 
It seems quite a bit easier to fix than some other unfortunate 
default choices.


More information about the Digitalmars-d mailing list