Re:Enums in Go
by lawn on Friday July 12, 2024 @06:48AM
(#40944360)
This is true, but in my experience these are edge cases and explicitly matching everything works well 90% of the time.
[ Parent
| on HN ]
Re:Enums in Go
by ReleaseCandidat on Friday July 12, 2024 @07:03AM
(#40944436)
This is actually the problém. I'd even say that it works like 95% of the time, that's why people (of course, I don't make such silly mistakes ;) aren't used to check where it matters.
In reality the policy must be to always (whether there are or aren't working exhaustiveness checks) manually check each and every occurence when adding. Don't get mé wrong, I prefer having exhaustiveness checks, but they make the manually searching a bit less tedious, not alleviate it in total.