News for hackers. Stuff that matters.
Re:Flags Are a Code Smell (2014) by anfilt on Sunday May 22, 2022 @01:54AM (#31465245)
A bit hyperbolic calling code smell. They even mention they have their uses.

I think the main point of this post is be careful with state explosion since each flag grows the number of states exponentially and likely not all of then are legal or make sense.

The other point is grouping similar things in memory is good for performance. Less failed branch predictions from checking flags and better cache coherence.

Thats not as a click bite-y of a title though.

Although the above is sound advice.

There are no comments on this comment yet.