three-reuse-mechanisms-composition-default

Status: IN

OO design provides three distinct reuse mechanisms — inheritance, object composition, and parameterized types (templates/generics) — with composition validated as the default for its runtime flexibility and encapsulation preservation, while parameterized types offer a third axis (type parameterization) orthogonal to the inheritance-composition choice.

Justifications

Third reuse mechanism enriches the design space beyond the binary inheritance-vs-composition framing

Depends on (SL): parameterized-types-third-reuse-mechanism, composition-superiority-for-reuse

Depended on by

JSON