Re:When are enums not a code smell?
by Semaphor on Monday November 22, 2021 @11:44AM
(#29308423)
But how is that an issue? I guess when you are casting random integer to the enum-type without any checks?
[ Parent
| on HN ]
> But how is that an issue? I guess when you are casting random integer to the enum-type without any checks?
Any caller can send any garbage (if you're publishing a package / API), likewise a dependency can return any garbage, etc... C#'s enums are entirely indicative.