ocp-bidirectional-extensibility

Status: IN

OCP achieves bidirectional extensibility: the standard composition-based direction (add new types without modifying existing code, validated by OCP's evolution from inheritance to abstraction) combined with Visitor's principled inversion (add new operations via double-dispatch without modifying element classes), ensuring no extension axis is permanently closed.

Justifications

Standard OCP extends types; Visitor inverts to extend operations — together they cover both axes

Depends on (SL): ocp-composition-with-principled-escape, composite-visitor-dual-ocp-coverage

Depended on by

JSON