3 ms·
I do think sum types would be a nice addition to Go, but this article is about the workarounds that people use since Go doesn't have them. For example, if you'
by skybrian 5y ago
I do think sum types would be a nice addition to Go, but this article is about the workarounds that people use since Go doesn't have them.
For example, if you're designing an API in Go, you should follow the established convention for error handling, rather than come up with your own weird thing, unless there's something special going on. Go's error handling is verbose but it's well understood and it's not broken.