3 ms·
Ah, that sucks. I don't think there's a solution to that apart from just adding an "Invalid" field to every enum class and initialising to that, but checking fo
by logicchains 6y ago
Ah, that sucks. I don't think there's a solution to that apart from just adding an "Invalid" field to every enum class and initialising to that, but checking for that (asserting not invalid) adds ugly boilerplate to every usage of every enum.
- saagarjha 6y agoRight. Type systems generally don’t like having invalid states at any point, because after all that’s kind of what they do :)