4 ms·
The section on exporting functions to check errors just exposes Go's weakness in error checking. It's unnecessarily verbose.
by sidlls 7y ago
The section on exporting functions to check errors just exposes Go's weakness in error checking. It's unnecessarily verbose.
- badrequest 7y agoThe 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 https://github.com/golang/go/wiki/ErrorValueFAQ
- sidlls 7y agoError 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