Inheritance of purity

Walter Bright newshound2 at digitalmars.com
Sat Feb 25 15:02:24 PST 2012


On 2/24/2012 3:22 AM, deadalnix wrote:
> Le 17/02/2012 17:19, Andrei Alexandrescu a écrit :
>> On 2/17/12 8:13 AM, kenji hara wrote:
>>> I think the lack of 'override' keyword (filed as bug 3836) should
>>> become an error, without the phase of deprecating it. Otherwise
>>> following case will be allowed.
>>
>> Yes. Walter?
>>
>> Andrei
>
> I'm surprised this isn't even mentionned in http://drdobbs.com/blogs/cpp/232601305
>
> I definitively don't think that pushing stuff like that - I'm suspecting for ego
> reasons - ignoring some flaw of the idea is a good way to proceed. This even may
> be armfull for the language on the long run.
>
> With no override keyword, function can just explode on your face for no aparent
> reason in the source code you are lookign at. This isn't an issue we should ignore.
>
> This has a pretty simple solution : don't inherit thoses attributes of override
> isn't present. On the long run, don't allow override without override keyword ?

Not using override is currently deprecated. Eventually, it will be required.

Doing this precipitously breaks existing code without allowing people plenty of 
time to upgrade their code. This annoys people, and results in them considering 
D "unstable" and "unusable".

I know that some do not see it as a problem to regularly introduce breaking 
changes and pull the rug out from under people every month. But I think that is 
a recipe for disaster.


More information about the Digitalmars-d mailing list