![](/static/66c60d9f/assets/icons/icon-96x96.png)
![](https://lemmy.ml/pictrs/image/d3d059e3-fa3d-45af-ac93-ac894beba378.png)
One should not use boolean just because variable has only two states.
I believe when you use boolean when enum should be used is called “boolean blindness”.
Eg: isFemale instead of enum Sex {MALE;FEMALE} It also gives you an option to simply extend code if requirements change and there are more than two options.
Realists are just pessimists.
You should be an optimist even if you are faking it. To lift others up.