Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M3318

Composition over Inheritance

Composition over Inheritance
SystemsHigh supportSystems Theory
Included
account_tree

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

psychology

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

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/4

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more

Source support: Explicit

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Composition_over_inheritanceZH · Explicit
    verified

RELATED MODELS