# Replace Boolean with Enum

> A technique for replacing a boolean parameter or flag with a closed set of named values.

Record: `lexicon:replace-boolean-with-enum`
Kind: technique
Layer: [Structural Core](https://banes-lab.com/records/layer/structural-core.md)
Canonical: https://banes-lab.com/ontology/lexicon#lexicon-replace-boolean-with-enum

Listed in [Lexicon terms](https://banes-lab.com/api/records/lexicon.md), after [Name Constant](https://banes-lab.com/records/lexicon/name-constant.md).

## Category

- [Core Vocabulary](https://banes-lab.com/records/lexicon-category/core-vocabulary.md)

## Refactors

- [Primitive Obsession](https://banes-lab.com/records/architecture/primitive-obsession.md)
- [Stringly Typed Programming](https://banes-lab.com/records/architecture/stringly-typed-programming.md)
- [Boolean Trap](https://banes-lab.com/records/architecture/boolean-trap.md)
- [Intent-Revealing Interface](https://banes-lab.com/records/architecture/intent-revealing-interface.md)

## Linked from

- [Anti-patterns](https://banes-lab.com/ontology/principles/architecture-category-anti-patterns.md)
- [Schema / Canonical Data / Semantics](https://banes-lab.com/ontology/principles/architecture-category-schema-canonical-data-semantics.md)
