Re:Goodbye, shitty "Car extends Vehicle" object-orientation ...
by seabee on Monday August 22, 2011 @09:22PM
(#2914915)
In a lot of OO languages instances rarely have different behaviour to each other.
You are also forgetting that it's possible to have more than one printer using the same driver (i.e. multiple instances of a class of printers). This is not uncommon when you consider network printers.
> The OS would have to already know about HPDriver in order to use its extra functionality
And that isn't true of any other instance in which inheritance is used?
You are also forgetting that it's possible to have more than one printer using the same driver (i.e. multiple instances of a class of printers). This is not uncommon when you consider network printers.
> The OS would have to already know about HPDriver in order to use its extra functionality
And that isn't true of any other instance in which inheritance is used?