The Go programming language continues on the path of accelerated learning and is loved by the developers who use it.
This is evidenced by several recent studies by developers, as well as the attitudes expressed by developers who use the language.
The JetBrains’ 2021 State of the developer ecosystem report, Go was among the top five languages the developers planned to adopt. It was also one of the top five languages developed by developers in the last year, and one of the five fastest growing languages.
In the official Developer survey from 202192% of respondents said that their satisfaction with Go is very high.
Go is the language of the cloud, so it’s no wonder that it’s continued to grow in popularity over the past few years as cloud-based development becomes more common.
“If you’re doing things on any cloud platform, people want to standardize in Go,” said Steve Ng, chief executive relations officer for Asia-Pacific and Japan at the monitoring company. A new relic.
What does Go “the language of the cloud” do? According to Andre Eriksen, founder of a back-end development company Encore.dev, there are several reasons for this. One reason is that Docker was originally created with Go.
In addition, many of the Cloud Native Computing Foundation’s (CNCF) projects are built in Go, according to Eriksen. Ng added that many of these CNCF projects also interact and feed each other.
Another contributing factor is that Go is an incredibly reliable language, in part because of the way it handles errors. He encourages developers to check for errors because they encode instead of relying on throwing and catching exceptions, as in other programming languages.
“And the way you write code when you use a programming language [that uses exceptions]”If you stop thinking about mistakes and just assume that everything will go well, and if something goes wrong, an exception will be thrown somewhere and we will try to deal with it,” Eriksen said. “And it works very well when things are going well. And then it gets awful when something goes wrong. And Go does it very differently, where mistakes are just any other value. And that makes you think about mistakes a lot more, every time you perform an operation in Go, for example when you write to a file or send a request over the Internet via HTTP, Go makes you just think what if it goes wrong and as a result The reliability systems built with Go are usually very, very high. ”
Another reason people think it’s reliable is that it has Google’s support. The language was developed by Google in 2009, and version 1.0 was released publicly in 2012. Go is still supported by the company today and is used in its production environments.
One good thing, according to Eriksen, is that Google has taken a conservative view of language change. The changes that are made in the language are usually at the edges, not in the main language itself.
Google is committed to backward compatibility in Go. According to Eriksen, this means that when the language is updated, these updates will not compromise your application. The exception to this is if there is a large security vulnerability that needs to be addressed.
Eriksen added: “If you look at other programming languages - no one breaks things because they want to, it’s because they see that we can do better. And we just have to change the way we do something. But it creates this kind of fear of upgrading and you end up sticking to the old version because upgrading to the latest version of Java is so scary and then you lose out on security fixes and performance improvements while in the Go community, almost every a company I’ve heard of, they’re releasing the latest version from the day or week it was published. “
According to Eriksen, Google is known for managing its production systems and the candidates for the launch of Go. This gives developers the confidence to upgrade to the latest version, because by the time the final version is ready, you know that everything is already working on Google, which gives a very strong signal to the community that the edition has been thoroughly tested.
“It’s super nice because we’re trying to stay up to date in the Go library,” said Mya Longmire, a software engineer at the database company. InfluxData. “So every time there is a new stable version, we try to update it as soon as possible. And the presence of this backward compatibility helps the work of developers. “
Google also listens to the community and their sore points when it comes to deciding to add new features, such as the recent addition of general programming support.
Go finally adds support for general programming
For a long time, generic drugs were not part of Go, which led to discontent among Go developers. Common programming allows developers to present functions and data structures while separating types, according to Language team Go.
“Without generic products, you reduce the possibility of reusing the code,” Longmeyer said. “So you just have to write a little more code to do the same. And that can seem like a big hurdle if you come from something that’s built on generics, like Java. ”
IN Developer survey from 202026% of respondents said that Go lacked the language functions they needed, and 88% of those respondents cited generic drugs as critically missing. The survey also found that 18% of respondents were prevented from using Go because they did not have generic drugs.
This sore point was removed in March 2022 with the release of Go 1.18. This version introduced generic support, with a commitment to add support for more complex generic uses in future releases.
“Go 1.18 is a massive version that includes new features, performance improvements and our biggest language change. Needless to say, the design of parts of Go 1.18 began more than a decade ago when we first released Go, ”the Go team wrote. blog post announcing the release.
Go thrives on large-scale software engineering
According to Eriksen, Google has placed great emphasis on large-scale software engineering for Go. “It’s not just about creating small programs, it’s about teams that create software over long periods of time,” Eriksen said.
This does not mean that Go is popular only in the biggest companies. In fact, according to Developer survey for 2021, the majority of respondents worked in teams of less than 10 people. Twenty-eight percent of respondents worked in small or medium-sized enterprises, and 25% worked in start-ups.
Go is especially suitable for large applications due to the speed of compilation. According to Eriksen, a Java application that takes 10 minutes or even an hour to compile can take several minutes if written in Go.
Go is a leader in supply chain security
Supply chain security has come first for many people in the last year, especially in the United States.
The Go team took this into account, putting a lot of focus into making sure that security vulnerabilities were not introduced before a project based on some dependency in use, according to Eriksen.
“I think Go is a leader in the field far and wide, with its approach to supply chain security,” he said.
Knowledge sharing is a big plus in Go
One of Longmire’s favorite things about Go is its documentation. She said reading the documentation was actually the way she learned the language.
“They have interactive documentation, which is really nice,” she said. “And you can find everything you’re looking for about how to use something or how to set up something that’s very unusual in newer languages.”
She also said that Go’s syntax is super readable, which helps a lot when working on legacy code bases or reading code from other developers.
Ng reiterated this view, saying that knowledge sharing in the community has really improved over the years. This, he says, is another way Go has benefited from CNCF, because so many CNCF projects have been written in Go and many of them feed off each other.