What I'd like to see in Go 2.0
I'd add one more to this list: proper enum types.<p>We use enums heavily to force devs who use our code into good choices, but the options are currently:<p>1) Use int-type enums with iota: no human-readable error values, no compile-time guard against illegal enum values, no exhaustive `switch`, and no autogenerated ValidEnumValues for validation at runtime (we instead need to create ValidEnumValues and remember to update it every time a new enum value is added).<p>2) Use string-type enums: human-readable error values, but same problems with no compile-time guards, exhaustive switch, or validation at runtime.<p>3) Use struct-based enums per <a href="https://threedots.tech/post/safer-enums-in-go/" rel="nofollow">https://threedots.tech/post/safer-enums-in-go/</a> : human-readable error values and an okay compile-time check (only the all-default-values struct or the values we define), but it still doesn't have exhaustive switch, is a complex pattern so most people don't know to use it, and suffers from the mutable `var` issues the post author detailed.<p>To my naive eye, it seems like a built-in, compile time-checked enum type with a FromString() function would help the community tremendously.