LORENZO

DEL ROSSI

Computer Engineer

Why should we choose Go?

2 min.
September 23, 2019

In a world with increasingly numerous technologies and languages, developing an efficient Web application has become even more a very delicate topic to deal with.

Since for each complex problem the best way to solve it is to divide it into sub-problems to be solved one at a time (the famous technique of Divide et Impera), in this article I will try to solve the first sub-problem underlying the development of our application : the choice of programming language.

From the title you can easily guess that the choice fell on Go, the new programming language developed by Google. Obviously this decision is not only due to my passion for testing new technologies (Go was officially announced in 2009 and released in 2012) or by the authority of those who contributed to its creation (the development team of the first version of Go was composed by Robert Griesemer, Rob Pike and Ken Thompson, for those who do not know them it is worth taking a look at their previous works), but also to a series of reasons that I am about to show you. To establish a comparison with languages widely known and used in the IT world, I will take Java and Python as reference languages.

Easier concurrency problems to solve…

The aspect of Go that intrigued me and pushed me to take it into consideration in greater detail is the fact that it is the first programming language born when computers were already conceived with multi-processor architectures, therefore the language also implements the so-called “goroutines “to take into account that portions of code could be executed simultaneously on different processors in concurrency. Goroutines are similar to threads except that they are optimized both in terms of performance and in terms of memory footprint.

…and not only

Go compiles the entire program into a single binary file and unlike Python there is no need for an interpreter to run and unlike Java there is no need for a Virtual Machine to run. In addition, the Go toolchain provides a critical stroke detector, a feature not present in Java or Python.
Consider also that more and more used and known tools like Docker and Kubernetes have been developed in Go.

These are the most obvious reasons why I chose (and recommend) to use Go as the basis for developing a web application.

#LetsGO