# Type Switching

> Branching on an object's concrete type instead of dispatching through a shared polymorphic interface.

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

Listed in [Lexicon terms](https://banes-lab.com/api/records/lexicon.md), after [Switch-Based Extension](https://banes-lab.com/records/lexicon/switch-based-extension.md) and before [Consumer-Specific Contracts](https://banes-lab.com/records/lexicon/consumer-specific-contracts.md).

## Category

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

## Negated by

- [Polymorphism](https://banes-lab.com/records/architecture/polymorphism.md)

## Linked from

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