Inheritance Alternatives

  • Martin Rinehart


C++ permits “multiple inheritance.” We’ll cover this next. Java simplified C++ and multiple inheritance was one of the advanced features it left out. In its place, Java featured “interfaces,” originally documented as a sort of poor man’s substitute for multiple inheritance, but in the end they proved far more valuable. (In  Chapter 5, you saw that interfaces are now commonly cited as one of the main OOP concepts. Multiple inheritance is not.) I extend interfaces to “capabilities” which borrow from and extend both Java’s interfaces and JavaScript’s “mixins.” Capabilities also allow a convenient replacement for multiple inheritance.


Base Family Multiple Inheritance Class Software Inheritance Hierarchy Object Hierarchy 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Martin Rinehart 2015

Authors and Affiliations

  • Martin Rinehart
    • 1
  1. 1.NYUSA

Personalised recommendations