Why Go
Latest update: December 22, 2022

Why Go? #

Well, why, really? The JVM is a vast universe and can do most things more than well. On top of that, it is evolving faster than ever. Looking at Java’s latest releases, you can hardly recognize the Java everyone has been bashing against. Of course, many of the old ghosts are still in the closet, but the truth is, Java is and will still remain a factor for the decades to come.

So why am I wasting your time, then? Or put otherwise, why are you wasting your time reading this page? I can literally go back in time to late 2018, when I asked myself that same question.

The answer was simple and consisted of one word alone: complexity. This talk by Rob Pike changed my mind for good:

Until then, I was a mid-to-sernior level Java developer who had recently moved away from an enterprise-y looking job, looking for a new career challenge. I loved complex solutions and frequently boasted about the architectures I had worked on and helped build. In short, I considered complexity a kind of medal of honor, not something you should struggle to fight against.

To be continued …

This focus on stability and performance in Go allows developers to quickly and easily upgrade to the latest version of the language without worrying about breaking their code. It is not uncommon for a new Go version to get released and for a substantial part of the Go community to migrate to it within days. Easily migrating to the latest version ensures that users have access to the latest security updates and bug fixes. Additionally, while adding new features is a rarity, performance improvements happen literally on ever release (case in point: garbage collection). Sometimes, simply recompiling the same piece of code with the latest version of Go would produce a faster, smaller, and more efficient binary without a single line of code change.

In contrast, there is a significant fragmentation of version usage in the Java world. Few systems run on the latest version (Java 19, as of this writing), with the majority spread across versions, dating back to Java 6 (as of Dec 2022). Combine this with the constant stream of new features being added to the language and you get a big dichotomy of what the ecosystem provides, and what existing projects actually run on. I have had the privilige to create projects from scratch, using the latest and greatest versions of Java at the time. The feeling is empowering at first, but as the application grows in size and complexity, migrating to a newer Java release can feel like a hurdle, or perhaps, even impossible in certain cases. With a few exceptions, this has rarely been the case with Go.

2022 State of the Java Ecosystem Report
Get an in-depth look at one of the most popular programming languages based on data drawn from applications reporting to New Relic.

Even if none of the above concerns apply to your work, learning Go as a Java developer is still valuable for one reason: it is a popular programming language, meaning there will always be a market for it. For multiple reasons, Go has become the go-to language for developing cloud infrastructure, and the vast majority of the cloud-native applications out there have been built with it. For the same reason, it is unlikely that big banks will ever replace their COBOL monoliths, big enterprises will invest in out-of-the-box cloud infrastructure rather than reinventing the wheel repeatedly. Many of you are using software written in Go as part of your daily developer routine. Others will begin adopting it soon. What better reason to look under the hood and see how to improve those applications so that they fit your routine or business even better?

Learning Go as a Java developer can be a valuable addition to your skillset, as it can open up new job opportunities and allow you to work on a broader range of projects. Additionally, the growing popularity of Go means that it will likely remain in demand for the foreseeable future, making it a worthwhile investment of your time and resources.