Genericity versus Inheritance Reconsidered: Self-Reference Using Generics
Abstract
As shown by the work of Bertrand Meyer, it is possible to simulate genericity using inheritance, but not vice-versa. This is because genericity is a parameterization mechanism with no way to deal with the polymorphic typing introduced using inheritance. Nevertheless, if we focus on the use of inheritance as an implementation technique, its key feature is the dynamic binding of self-referential operation calls. This turns out to be basically a parameterization mechanism that can in fact be simulated using generics and static binding. And for some applications this approach may actually be of more than academic interest.
DOI 10.1145/191080.191109