# Introduce Discriminated Union

> A technique for modeling a value that takes one of several shapes as a union whose variants carry a tag the type checker reads.

Record: `lexicon:introduce-discriminated-union`
Kind: technique
Layer: [Contracts Core](https://banes-lab.com/records/layer/contracts-core.md)
Canonical: https://banes-lab.com/ontology/lexicon#lexicon-introduce-discriminated-union

Listed in [Lexicon terms](https://banes-lab.com/api/records/lexicon.md), after [Read Performance](https://banes-lab.com/records/lexicon/read-performance.md) and before [Narrow Type](https://banes-lab.com/records/lexicon/narrow-type.md).

## Category

- [Schema / Canonical Data / Semantics](https://banes-lab.com/records/lexicon-category/schema-canonical-data-semantics.md)

## Refactors

- [Stringly Typed Programming](https://banes-lab.com/records/architecture/stringly-typed-programming.md)
- [Self-Describing Structures](https://banes-lab.com/records/architecture/self-describing-structures.md)

## Linked from

- [Anti-patterns](https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md)
- [Metadata / Self-Description / Declarative Systems](https://banes-lab.com/ontology/principles/architecture-category-metadata-self-description-declarative-systems.md)
