[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.c++

Re: use of the new override specifier

Marcel Müller

6/11/2016 7:58:00 AM

On 10.06.16 19.53, Richard wrote:
> Marcel Mueller <news.5.maazl@spamgourmet.org> spake the secret code
> <njdorh$6n4$1@gwaiyur.mb-net.net> thusly:
>
>> I leave it up to the IDE to identify overrides. This is more reliable.
>
> Nothing is more reliable than the compiler, IMO. IDEs are notorious
> for taking shortcuts that result in false positives or negatives.

Well, you are talking about parser bugs, aren't you?
True, from time to time the IDE is confused by the code. But programmers
tend to fail too. So if I have the choice to rely on the programmer or
on the IDE to identify an overridden method I would trust the IDE more.
That's why I do not call code that uses override more readable.

However, there are other use cases. I.e. in case of refactoring of the
overridden method the override keyword prevents accidentally missed
changes in derived classes. But this improves maintainability not
readability.


Marcel