While there are plenty of annoying things about Golang, I don’t really agree with some of the things.

  1. Yes, Golang tells us to bubble up errors. When you have them! Eg, if I have an exceptional situation that should be handled by the function user, then do it. There are however 2 other situations: a) you don’t have errors to bubble up or b) the only possible exceptional outcome is a panic (as required by whatever library / application you are implementing). There is absolutely no requirement to ALWAYS return an error. If you have an error, yes, you should return it, but if if you don’t then … there’s no point.

For me, the most annoying thing about Go is the error handling and lack of automatic bubbling up. I do like it more than try / catches because it forces being explicit and transparent about what’s happening. Errors don’t exist in a separate plane of existence where you can catch whatever you feel like and let the app crash for whatever else but are part of your flow and you have to deal with them or at least acknowledge them enough to return them.

Yes, it’s tedious and annoying but I don’t find it bad.



Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store