Re:Flags Are a Code Smell (2014)
by tempodox on Sunday May 22, 2022 @03:23AM
(#31465744)
The risk is that if you have mutually exclusive predicates, a memoized/persisted flag set might be contradictory. You'd need extra code to check that this is not the case. It's just safer to make invalid states unrepresentable.
[ Parent
| on HN ]
There are no comments on this comment yet.