When you asked:
Even if you know that classical inheritance is not incorrect to implement a certain model, is that reason enough to use it instead of composition?
The answer is no. If the model is incorrect (using inheritance), than it's wrong to use no matter what.
Here are some problems with inheritance that I've seen:
- Always having to test the run time type of derived class pointers to see if they can be cast up (or down too).
- This 'testing' can be achieved in various ways. You may have some sort of virtual method that returns a class identifier. Or failing that you may have to implement RTTI (Run time type identification) (At least in c/c++) which can give you a performance hit.
- class types that fail to get 'cast' up can be potentially problematic.
- There are many ways to cast your class type up and down the inheritance tree.