# Switch-Based Extension

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

Record: `lexicon: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#lexicon-switch-based-extension

Listed in [Lexicon terms](https://banes-lab.com/api/records/lexicon.md), after [Fat Interface](https://banes-lab.com/records/lexicon/fat-interface.md) and before [Type Switching](https://banes-lab.com/records/lexicon/type-switching.md).

## Category

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

## Negated by

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

## Linked from

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