Hacker News new | past | comments | ask | show | jobs | submit login

C# enums explicitly tell you that and it is well documented. You have easy Enum.IsDefined(enumValue) as well as Enum.GetName(enumValue) which work exactly as advertised. Switches on enum values will tell you to handle the default case too.

They are not ideal by modern standards when you look at Rust. But to state that they are worse than Go's is a new and I can't find a way in which this kind of statement would defensible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: