For a long time, generics weren’t a part of Go, which led to disastiasfaction among Go developers. Generic programming allows developers to represent functions and data structures while factoring out types, according to the Go language team.

“With no generics, you decrease your code reusability,” said Longmire. “So you just have to write a little bit more code to do the same thing. And that might seem like a big hurdle if you’re coming from something that’s built on generics, like Java.”

In the 2020 Go developer survey, 26% of respondents said Go lacked language features they need, and 88% of those respondents cited generics being a critical missing feature. The survey also revealed that 18% of respondents were prevented from using Go because it didn’t have generics.

This pain point was remedied in March 2022 with the release of Go 1.18. This release introduced support for generics, with a commitment to add support for more complicated generic use cases in further releases.

“Go 1.18 is a massive release that includes new features, performance improvements, and our biggest change ever to the language. It isn’t a stretch to say that the design for parts of Go 1.18 started over a decade ago when we first released Go,” the Go team wrote in a blog post announcing the release.

Go thrives in large scale software engineering

According to Eriksen, Google has put a large focus on large scale software engineering for Go. “This is not a thing for just building small programs, it’s a thing for teams building software over long periods of time,” said Eriksen.

This is not to say that Go is only popular at the largest companies. In fact, according to the 2021 Go Developer Survey, a majority of survey respondents worked on teams of less than 10 people. Twenty-eight percent of respondents worked at small or medium-sized businesses and 25% worked at startups.

Go is particularly suited for large applications because of its compilation speed. According to Eriksen, a Java application that takes 10s of minutes or even up to an hour to compile might take a few minutes had it been written in Go.

Go is leading the field on supply chain security

Supply chain security has been top of mind for many people in the past year, especially in the US.

The Go team has taken that into consideration by putting a lot of focus into making sure that security vulnerabilities aren’t introduced upstream of a project based on some dependency in use, according to Eriksen.

“I think Go is leading the field far and beyond everything else with their 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 that reading through the documentation is actually how she learned the language.

“They have interactive documentation, which is really nice,” she said. “And you can find anything you’re looking for on how to use something or how to set something up, which is very uncommon in newer languages.”

She also said that the syntax of Go is super readable, which helps a lot when working on legacy codebases or reading other developers’ code.

Ng echoed this sentiment, saying that knowledge sharing in the community has really improved over the years. This, he says, is another way in which Go has benefited from the CNCF because so many CNCF projects are written in Go and a lot of them feed off each other.

Source: sdtimes