4 ms·
For me enums win especially when you consider that you can get help from your environment every time you add/remove stuff. Some languages force you to deal with
by NitpickLawyer 2y ago
For me enums win especially when you consider that you can get help from your environment every time you add/remove stuff. Some languages force you to deal with the changes (i.e. rust) or you could add linter rules for other languages. But you're more likely to catch a problem before it arises, rather than deal with ever increasing bool checks. Makes reasoning about states a lot easier.