2 ms·
I hated it but I’ve grown into it, specially with the latest improvements and the https://pkg.go.dev/github.com/pkg/errors https://pkg.go.dev/github.com/pkg/err
by mlinhares 3y ago
I hated it but I’ve grown into it, specially with the latest improvements and the https://pkg.go.dev/github.com/pkg/errors https://pkg.go.dev/github.com/pkg/errors package.
It’s still not as good as having Either/Try monads available to avoid the mess of “if err != nil” madness but having gone back to Java lately and the issues we have with exceptions there, having errors as values instead of a magical control flow feature makes the code easier to understand.
Now that I can make sure I include slack traces on them so it’s easy to find where they originated I have the best of exceptions in place as well.