Member-only story

Hypocritical Gophers

Peter Christian Fraedrich
The Startup
Published in
8 min readMay 11, 2020

--

The Golang gopher, looking nervous that someone’s about call him out for his b******t.

Most of my time over the past two years has been developing primary in Go. If you’re not familiar with the Go programming language let me sum it up for you real quick: take a modern, statically-linked, type-strict language and remove every advancement in development in the last 10 years or so, do some pretentious talks about how your language is the best one out there, and you have Go. Now, don’t get me wrong, Go is a fantastic language. The problem is that its also a horrible language.

Error Handling

In Go, errors are “bubbled up” to the top of the call stack, meaning that functions are expected to return an error as one of the return values. This is laid out in “Effective Go”, the official Golang.org guide to writing “idiomatic Go code”.

Library routines must often return some sort of error indication to the caller. As mentioned earlier, Go’s multivalue return makes it easy to return a detailed error description alongside the normal return value. It is good style to use this…

--

--

The Startup
The Startup

Published in The Startup

Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +772K followers.

Peter Christian Fraedrich
Peter Christian Fraedrich

Written by Peter Christian Fraedrich

Entrepreneur, software developer, writer, musician, amateur luthier, husband, dad. All opinions are my own.

Responses (22)

Write a response