# Switch-Based Extension

> Extending behavior by editing a growing switch or conditional on a type instead of adding a new polymorphic type.

Record: `lex:switch-based-extension`
Kind: anti-pattern
Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)
Canonical: https://banes-lab.com/ontology/lexicon#lex-switch-based-extension

## category

- [SOLID / Object-Oriented Design](https://banes-lab.com/records/lex-category/solid-object-oriented-design.md)

## referenced-by

- [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md)
