News for hackers. Stuff that matters.
Re:Enums in Go by dgb23 on Friday July 12, 2024 @08:10AM (#40944793)
But you're not adding variants without a reason? You want them to have some effect.

It's hard for me to think of an example where it would make even sense to "having to remember to handle the variant" rather than "handling the desired effect of the variant".

Re:Enums in Go by K0nserv on Friday July 12, 2024 @08:25AM (#40944882)
People are stressed, get distracted, are tired, don't have complete knowledge etc. This is kind of like arguing that null pointers aren't a problem, you "just" have to check all usage of the pointer if you make it null. In practice we know solutions like this don't work