Why Use Golang?

Tiobe Index

When I first looked into Go (Golang) in 2015, I was very delighted by this beautiful language. Fast-forward a few years, and Go is listed at position 11 of the most popular programming languages according to the Tiobe Index. Of course, common languages like Python, Java and C# are way above. However, when you consider that Golang is much younger than all the languages ranking higher, this is quite impressive. Older languages are naturally more prevalent since more existing software is based on them.

Is Go actually used that much?

Yes, in fact, Go is probably used more often than you think:

  • Most projects under the Cloud Native Foundation are written in Go. Popular examples include Docker, Kubernetes, Helm, Prometheus, ArgoCD, Terraform and Consul. Many companies have adopted these tools by now.
  • Other sectors include FinTechs, web service API providers, network, communication, media and streaming companies.
  • Some companies are slowly moving away from languages like PHP, Java and even Python to build more services in Go.

Why is Go adopted by companies and developers?

There are many advantages that look quite plain from the outside. The real power of Go is based on its pragmatic approach to software engineering. Overall, Go provides a good experience for both developers and companies:

  1. Small and simple language: Experienced developers learn the basics in a single weekend. Most concepts and features are indeed essential and free of unnecessary bloat and verbosity. As a result, the language is easier to learn and easier to use than many others, resulting in better developer productivity.
  2. Resource efficiency: Efficiency is a complex topic that depends on many factors. However, in the era of cloud applications, it is very valuable to have applications compile to a single, self-contained binary with a low memory footprint. This is usually more efficient than using VM- or interpreter-based languages.
  3. Lightweight concurrency: These days, many languages offer concurrency concepts for scaling applications. Go shines in terms of ease-of-use as well as scalability.
  4. Fast compilation and type safety: The value of type safety is quite clear today (e.g. see the rise of Typescript or Python type hints). Combined with very fast compilation, this makes a great feedback loop, ideal for CI/CD, refactoring and prototyping. No more fetching coffee while the compiler runs!

When not to pick Go?

Of course, there is no single technology for every use case. Would you use a hammer to cut your pizza? Probably not. Here is a list of use cases that I would not consider suitable for Go:

  1. Frontend building: While Go is excellent for backends, decently complex frontends need additional tooling, unless all you need are a few HTML templates.
  2. Mobile applications: If you need a native mobile application, Go will not work for you because there is almost no support. You might be able to use it in the backend when building a hybrid or progressive web app, though (again, combined with a web framework).
  3. Data science: Go is definitely geared towards software engineering. It will probably not work well for complex data analysis. A more dynamic language like Python or R will work better.
  4. Very specific dependencies: If you absolutely need a specific framework or library for your business case, Go may not work for you. Although the ecosystem is growing, you might have a hard dependency on, say, a PDF or GUI library from Java or .NET that you cannot easily replace.

What is your opinion on the Go programming language? Have you tried it, or are you even using it on a daily basis?

Note: You can also find this episode on YouTube and Spotify.

#Golang #SoftwareEngineering #CloudNative #DeveloperProductivity

Bastian Isensee
Bastian Isensee
Software Engineer (Freelancer)

Quality-driven Software Engineer focused on business needs, knowledge sharing, FinTechs, Golang and Java