For the Love of Golang
I think golang is the best backend language (and I’ve worked with a lot of languages). At Flyflow we use a mix of golang (mostly) and python on the backend (with ts on the frontend). I’m really happy with anything as long as it compiles, but golang has a special place in my heart.
First, the language you use really doesn’t matter, the product you build does, but there are some features of languages that make them especially useful.
Reasons to Choose Golang
This isn’t your normal post about concurrency or typed vs untyped languages. These are the nitty gritty details of what makes golang the right choice.
Most Important Feature: Golang Scales as Orgs Scale
It doesn’t matter if you’re working with microservices or a monolith. If you use Go, your engineers can work seamlessly across the codebase. The reasons for this is simple: golang is the most basic language you will ever encounter. There is only one way to do anything right, and for this reason all go code looks the same. This means the learning curve for engineers to jump from one section of the code to another is effectively zero, doesn’t matter who wrote it or in what “style“. Any engineer who knows go can work in any part of the code, no problem.
I was around when Coinbase decided to use Go as the primary backend language. We were migrating away from Ruby and switching to either Golang or Kotlin. Go became the choice for this reason.
Shipping Features is Fast
I think this is the most important part of any language is how fast you can go from zero to one on new features. This is important for essentially any company, big or small. Languages like python or ruby are good because they let you do essentially anything and it still can go to prod. The problem with this is it results in a lot of runtime errors and can often mean more bugs than productivity. Statically typed languages are net on net slower to write, but often produce less errors and mean you can ship straight to prod.
At this point, as an experienced golang programmer, I can go from zero to one on a feature just as fast as I could in python, and as long as it compiles, it’s normally good to go. This is a huge advantage.
Shipping Bugs is Hard
It’s hard to ship a golang bug. You need to try. Yes it’s possible, but if you have even semi normal CI/CD your error rate will be a lot lower. The statically typed nature of golang means if it reads normally and compiles, then it will work well in prod. As a startup I quite often just trust my editor and CI to catch anything and can go straight to prod. We haven’t shipped a major bug in the past 6 months.
Other Features
The above two features are what matter to me the most. The rest is just the icing on top. Golang is fast, like really really fast. It’s typed, and has first-in-class concurrency features that can handle pretty much any load. Our backend at Flyflow handled number one on hacker news traffic with a single server, because it was in golang. Package management is overall great, there’s tons of great content on the language for junior devs to learn, and overall it’s on of the most ergonomic language I’ve worked with.
Conclusion
Number one rule for builders: what language or tech stack you use doesn’t matter. Oftentimes success on the business side means you can work your way out of any bad technical decision. As someone who’s dedicated to the craft though, I love this language, and would be happy building anything in it.