Your average software engineer is still in love with Python. Married, even.
But not those at Google, Uber, Dropbox, Soundcloud, Slack, and Medium. The programmers at top corporations have long fallen for the language withthe cute mascot.
That’s not to say that Python is no good. It’s great!
But whether it’s for APIs, web services, or data processing — while most developers are still using Python, top-performers are adopting Golang, or Go, more and more. Because it rocks.
Go was invented by anall-star trio at Google: Robert Griesemer was one of the heads behind Google’s V8 JavaScript machine and a main developer for Sawzall, another language invented by Google. Rob Pike co-developed the Unix environment and co-created the Limbo programming language. With Ken Thompson, the team had the inventor of Unix and the creator of the B language — the predecessor of C — on board.
Calling all Scaleup founders! Join the Soonicorn Summit on November 28 in Amsterdam.
Meet with the leaders of Picnic, Miro, Carbon Equity and more during this exclusive event dedicated to Scaleup Founders!
Google was originallywritten in Python— yes, Python is still cool — but around 2007, engineers were searching for a better language to perform typical tasks at Google. They were encountering problems like these, according to atalk by Rob Pikein 2012:
So the trio set out to design a language that was clean, simple, and readable. A language that would eliminate, or at least ease, these all-too-common problems in software engineering.
The root of many of these common problems is the complexity of modern languages. Think of Python or C — have you ever tried to read the whole documentation? Good luck with that.
In contrast, the greatest feature of Go is its simplicity. That’s doesn’t mean you can’t build complicated code with it. But Go is very deliberate about not having features that bring more complexity without solving the problem.
For example,Go doesn’t have classeslike other object-oriented languages. A much-used feature of other languages, classes are great to make one object inherit the properties of another object. The problem is that if you try to change the structure of one object without changing that of the others, you’ll break the code. Go has an alternative, called struct, that favors composition over inheritance.
Other key features of Go are:
All this might sound boring and uncreative. And in a sense that’s true — this is no language with funky features that you could use to impress others, a plethora of ways to solve a problem, no freedom without limits. Go is no language that is there to explore, to do research with.
But it’s amazing when you’re trying to build something that works. When you’re on a team with lots of different people from different backgrounds working on the same code. When you’re tired of all of the mess that you encounter with other languages.
…With a thriving community
Because of its simplicity, Go is one of the most collaborative languages that exist these days. The times are over when programmers used to sit in their little cubicles and never meet others.
Now, we have StackExchange to solve all our coding problems. And we have Slack, Zoom, Google Meet, and more to stay in touch with our team. But modern languages are still tailored to the little nerd in the cubicle.
Go changes that. Despite being twenty years younger than Python, it has a vibrant community.
So it comes as no surprise that they put respect, openness, and friendliness atop theircode of conduct. While other languages, like Python or C, also have comparable community statements, there is less emphasis on these basic values.
So it’s no surprise that the community plays an explicit role in the annual Go surveys — unlike in many other languages.
The data speaks for itself
According to the2020 Go survey, Google’s language is mostly used for web development, network, and systems programming. The landscape for Python looks pretty similar:
The only striking difference is how much Python is used for data analysis and machine learning. And on these domains, otherhot new languagesare emerging.
Apart from that, you can see that many of Python’s usages could be replaced by Go. That includes 50% in web development, 38% in system administration and DevOps, and 19% in network programming. Even if you assume that many developers do all three of these jobs, you can safely assume that half the Pythonistas are doing things that they could do in Go.
Indeed, developers are aware of the huge potential that Go offers. According toHackerrank, about a third of all programmers wanted to learn Go in 2020.
The trend is real — and since Go is dead easy to learn, we should see a shift from Python to Go in the next few years. For most companies — especially those that are not as big and well-funded as Dropbox or Medium — rewriting all their code to Go will be too expensive. But for new projects, you should at least try it.
At the biggest companies, developers are already building their success with Go. When will you?
This article was written byAri Jouryand was originally published onTowards Data Science. You canread ithere.
Story byAri Joury
Get the TNW newsletter
Get the most important tech news in your inbox each week.