3 ms·
Except in Go you would be manually "rethrowing" exceptions whereas in other languages that is done automatically.
by royjacobs 12y ago
Except in Go you would be manually "rethrowing" exceptions whereas in other languages that is done automatically.
- leaveyou 12y agoIt's verbose and explicit but this is like using tests for your programs: boring and annoying short term but very useful medium and long term.
- royjacobs 12y agoYes, that can definitely be the case. It's just a hard problem in general. So far the explicitness of Go's error handling reminds me a little bit of checked exceptions in Java: I appreciate the idea but I'm not sure it's the best thing we could do.
- jerven 12y agoVerbose and explicit is what made java checked exceptions the sign of the demon for some programmers. The err pattern in GO might end up the same. In the end I think the problem is that there are two separate classes of programs. The first is where crash on exception is tolerable and even a desired property (or blindly and optimistically continuing). The second is always deal with exceptions and any error no matter how rare and unlikely they are, and attempt to recover and deal with them properly. No one language and standard library can really please both sides.