<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That is the case with overriding a non-virtual function - the compiler will compile it anyway, and most of the time it will work. That's what makes it so eeevil.</blockquote>
<div><br></div><div>I saw today, or last night, someone suggesting a keyword to make non-virtual override explicit, and error otherwise. Which actually sounded like a really good idea to me, and also addresses this problem.</div>
<div>I think a combination of not-virtual-by-default, and an explicit non-virtual override keyword would cover your concern, and also minimise the use of virtual functions. Sounds perfect to me ;)</div><div>Overriding a non-virtual is actually very rare, and probably often unintended... I really like the idea of a keyword to make this rare use explicit.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems to me the decision is that of sacrificing a real and common problem<br>
case with frequent and tangible evidence, for the feeling that the language is<br>
defined to do the 'right' thing?<br>
</blockquote>
<br></div>
The right thing should be the default.<br></blockquote><div><br></div><div>But I fundamentally disagree your choice is 'right'.. This is obviously subjective, so I don't think that's a fair assertion.</div>
<div>The problem was obviously not completely defined, and not addressed entirely.. I think the proposal above sounds like a better solution all round, it addresses everyones concerns, and adds a nice little safety bonus for rare non-virtual overriding ;)</div>
<div>But as I've previously said, I understand this can't change now, I've let it go :P</div></div>