>In this issue, proper understanding is muddled by "OOP" languages that have a static type system which uses inheritance as a gatekeeper to polymorphism.
I am trying to think of a commonly used language that exclusively uses inheritance to implement polymorphism. (Unless you consider Java’s interfaces to be inheritance when they are the language’s alternative to using inheritance.)
> (Unless you consider Java’s interfaces to be inheritance when they are the language’s alternative to using inheritance.)
Having come to Java from C++, I always considered Java's interfaces to be a syntactic sugar on top of inheritance. In C++, there is (or was, back then) no meaningful difference between "interface" inheritance and "class inheritance" - and why would there be, if it boils down to stringing up vtables together?
I am trying to think of a commonly used language that exclusively uses inheritance to implement polymorphism. (Unless you consider Java’s interfaces to be inheritance when they are the language’s alternative to using inheritance.)