News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.