Up
|Prev
|Next
page 4
Two Kind of Inheritance
- Implementation Inheritance
- [What:] Inherit inst. vars and method code.
- [Goal:] Code reuse, code mixin.
- Interface Inheritance (or Subtyping)
- [What:] Inherit method names and signatures.
- [Goal:] Avoid redundunt declaration.
- [Goal:] Basis for genericity (dynamic dispatch).
- Recent trends: separate Impl./Interface inheritance (e.g. Java).
Up
|Prev
|Next