Composition over Inheritance
Version 1.0.0 · Updated 2026-07-31
CORE DEFINITION
When building systems, prioritize implementing functionality by assembling simple components (composition) rather than establishing deep hierarchical relationships (inheritance).
SCAFFOLDING EFFECT
Reduce cognitive load
Lego-like flexibility. Don't try to design a universal 'parent class' for everyone to inherit (inheritance leads to rigidity and fragility). Make small, beautiful building blocks that can be plugged in wherever needed. In organizational design, forming flexible project teams (composition) is superior to rigid bureaucracy (inheritance).
Anchor fast decisions
Prioritize assembling simple components (composition) to implement functionality, rather than building deep hierarchical inheritance. Inheritance easily leads to rigidity and fragility (changes in the parent class affect subclasses), while composition is more flexible, replaceable, and reduces coupling.
MINIMUM ACTION
In progress 0/4Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Composition_over_inheritanceverified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS