# enums

An enumeration is a programming construct representing a limited set of named values.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## The Boolean Trap

DevFeed: [The Boolean Trap](<https://devfeed.tech/articles/the-boolean-trap-39098.md>)

Original publisher: [Read original article](<https://read.engineerscodex.com/p/the-boolean-trap>)

Author: Engineer's Codex

Published: 2024-09-05T02:06:52Z

Content type: opinion

Language: en

Sources: [Engineer's Codex](<https://devfeed.tech/sources/engineer-s-codex.md>)

Topics: [enum](<https://devfeed.tech/topics/enum.md>), [enums](<https://devfeed.tech/topics/enums.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [coding](<https://devfeed.tech/topics/coding.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [enum](<https://devfeed.tech/tags/enum.md>), [enums](<https://devfeed.tech/tags/enums.md>), [function](<https://devfeed.tech/tags/function.md>)

### AI overview

This article explains the boolean trap: boolean parameters in functions and APIs can make code unclear and difficult to extend. It recommends using enums instead, even for binary choices, because enums improve readability, typing, maintainability, and extensibility.

### Source excerpt

Use enums instead