3 ms·
> Ok, this requires Rust's "rich enum type" (whatever that's called), and some sort of generics, both of which Go doesn't have. This is one of the reasons so m
by nicoburns 6y ago
> Ok, this requires Rust's "rich enum type" (whatever that's called), and some sort of generics, both of which Go doesn't have.
This is one of the reasons so many people are calling for Go to get generics.
> or as "safe" (because one can access the value even when an error is returned)
Which is one of the key things one wants from an error handling mechanism: the inability to misuse it.
- apta 6y ago> This is one of the reasons so many people are calling for Go to get generics. Even if it gets them at some point, the language still needs support for algebraic types, which not surprisingly, the golang authors "don't see it as useful".