> For me a pure virtual method is an interface method and any other
> is an implentation. What's wrong with virtual interface methods?

I prefer to think like Scott Meyers (of Effective C++/STL fame):
1. nonvirtual functions are invariants across specializations -- they should 
never be overriden because that's bug-prone and violates their real world 
meaning of being invariants
2. pure virtual functions specify interfaces; they lack reasonable default 
behaviour and should be implemented by specializations
3. impure virtual functions provide default behaviour that isn't against 
common sense in most cases, otherwise they are to be reimplemented in 
specializations

I.e. there's nothing wrong with virtual interface methods, as long as they are 
used in the correct sense.

Here derived class = specialization.

Cheers, Kuba Ober

Reply via email to