Jason Warner
Feb 11, 2022

--

You stumbled across the arcane practice of bit flags. I have used bit flags in the past, but not as much now. They are particularly useful for something that will have an unknown number of multiple flags in its default configuration. I don't tend to use them as much because in a lot of cases, flags are an anti-pattern and can be replaced with better object/functional composition. Most of my enum usage is to store commonly used values.

--

--

Jason Warner
Jason Warner

Written by Jason Warner

I enjoy everything related to code and being a dev. However, my only skills are showing up and being lucky and I'm not sure if luck is a talent.

No responses yet