Overloading/Inheritance issue

Sean Kelly sean at f4.ca
Tue Aug 7 18:03:43 PDT 2007


Bill Baxter wrote:
> Walter Bright wrote:
>> James Dennett wrote:
>>> This might not sit well with those who think that virtual is
>>> a good default though.  I'm not one of them; I've never seen
>>> problems caused by non-virtual as default,
>>
>> I, for one, have had several severe and very hard to find bugs caused 
>> by non-virtual as the default. It's something that defies visual 
>> inspection looking for them.
> 
> Is there some way currently to force methods to be non-virtual?  Does 
> 'final' do that?

Yes, that's what 'final' is for.  In my D code, it's rare that I'll 
write a function that isn't final.


Sean



More information about the Digitalmars-d mailing list