Re:Thirteen Years of Go
by throwawaygal7 on Friday November 11, 2022 @03:25PM
(#33566322)
In go, you either handle the error where it happens or close to it, or log it. No need to pass things up just to log. I like the simplicity, and the zero cost at runtime. If you could handle the error in another lang you could handle it in go, or youd just supress or log it anyway.
Re:Thirteen Years of Go
by erik_seaberg on Friday November 11, 2022 @04:27PM
(#33567089)
In a microservice, there are very few errors that you don’t handle by doing nothing and returning the error to the caller. Retrying may be an option, but you have to be careful not to make your system into a cascading failure amplifier.
My experience with Go has been that errors get "handled" by propagating them up the stack manually and then logging them, without keeping proper track of how the error got there. So there is error handling but only in theory, in practice what you get is a sort of hand-written stack unwinding logic with far worse functionality and consistency than exceptions, at 100x the verbosity.