Re:Flags Are a Code Smell (2014)
by ummonk on Saturday May 21, 2022 @09:45PM
(#31464119)
No that’s not really a code smell for me. It’s really normal for data types not to prohibit illegal states, and that isn’t an issue specific to having multiple Boolean flags. It’s something that a more powerful type system can help solve though (specifically, discriminated union types do this).
[ Parent
| on HN ]
There are no comments on this comment yet.