JavaScript:
Non-classical inheritance
It's easy to mimic classes
in JavaScript...
Classical inheritance libs:
but none of those libraries has become a defacto standard
Inheritance hierarchies are trouble
Favor object composition over class inheritance
The Gang of Four, "Design Patterns"
Three kinds of prototypal OO
Cloning / concatenation
- Great for default state
- Mixins
Functional inheritance
- Great for encapsulation / privacy
- Is an alternative to a constructor / init function