Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sidlls
· 7y ago · 0 comments
The section on exporting functions to check errors just exposes Go's weakness in error checking. It's unnecessarily verbose.
Comments
[–]
badrequest
7y ago
The way to do this properly got much better in the most recent Go release, the linked documentation doesn't yet take that into account, it would seem.
https://github.com/golang/go/wiki/ErrorValueFAQ
[–]
sidlls
OP
7y ago
Error handling in go would be much better with a proper sum type, though. It's very clunky as-is, even with the improvements outlined in that link