Inheritance Alternatives
Martin L. Rinehart
Abstract
Martin L. Rinehart
Abstract
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. 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.
A significance statement is not available in the OpenAlex record.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
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. 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.
Key concepts: Inheritance (genetic algorithm), Multiple inheritance, Computer science, Java, Programming language, JavaScript, Object-oriented programming, Biology