template-method-inheritance-bounded-by-composition

Status: IN

Template Method's principled inheritance counterexample and Decorator's demonstrated composition scalability together illuminate two key regions of the reuse decision space: Template Method identifies specific structural constraints under which inheritance-based reuse can be disciplined (algorithm skeletons with fine-grained override control), while Decorator's exponential advantage over inheritance in feature combination illustrates why composition tends to be the stronger default — offering practitioners both a qualified exception and a concrete basis for the general preference.

Justifications

Template Method defines when inheritance works; Decorator proves composition works everywhere else

Depends on (SL): template-method-principled-inheritance-counterexample, decorator-proves-composition-scalability

Depended on by

JSON