Why Go: The benefits of Golang

Julien Etienne
3 min readApr 18, 2022

--

This is a higher-level overview of what makes Go desirable for:

  • Web Development
  • Cloud & Network Services
  • DevOps & Site Reliability
  • Command-line Interfaces

Binary executable

IMO this is one of the most unappreciated aspects of Go. Being able to compile to a single executable binary means:

  • No runtime interpreter is needed so a binary can be far slimmer than a nest of project’s sub-directories. This is beneficial for containerisation and orchestration performance.
  • No additional runtime is needed for execution as it’s machine code, therefore a binary executable can perform and recover with resilience.

Minimalist

If you’ve played with the basics of Go, you will notice that the language is not trying to be overly complex or impressive. It’s just enough to get the job done.

Automatic garbage collection

Go is a higher-level language with automatic memory management without the need for intervention. So you can focus on the more important aspects without too much compromise on performance. Not everybody likes the idea of automatic garbage collection, but productivity is the theme here.

Format

There is one built-in formatting engine, no need to use things like “prettier.js” and there’s no need to re-invent the wheel.

Built-in testing and benchmarking

Libraries aren’t required for unit-testing or benchmarking so you will likely have familiar testing and benchmarking setups when collaborating on a variety of projects.

Advanced concurrency techniques

Goroutines are like cheap (performance-wise) virtual threads that can be multiplexed across real threads. Goroutines, Channels, Mutexes, WatiGroups etc encourage patterns that allow parts of your codebase to talk to each other efficiently. Go has a vastly improved workflow when compared to concurrency in an asynchronous platform such as node.js.

Low boilerplate code

Go requires very little boilerplate code to create substantial applications, unlike Rust which requires far more boilerplate code when matching equivalent capabilities.

Networking

Go features a dedicated Networking API aimed at network programming built into it’s standard library. This is part of the external sub-repositories that belong to the Go project.

One of the fastest back-end programming languages

In recent years there have been several benchmarks (and rants) alluding to Go back-end applications sometimes being faster than Java and Rust back-end applications. Without dwelling on specifics, we get the picture, Go is fast.

Despite some misconceptions on the importance of speed in software development, fast is crucial for user experience and development costs.

Young language

There is no one size fits all. Maturity can sometimes have an advantage on youth but it’s also worth respecting that many quality aspects of newer languages like Swift, Go, Dart, Clojure etc have learnt a lot from the giants that came before them.

Check out:

--

--