Go Language Riding High with Devs, But Has a Few Challenges
The Go language community recently released the results of the 2021 Go Developer Survey, which found that satisfaction with Go remains high, although there are some challenges to overcome to increase adoption.
Ninety-two percent of respondents said they were very or somewhat satisfied with using Go during the past year, and 75% said they use Go at work. Go ranks number 10 on the list of most-loved languages in the 2021 Stack Overflow Developer Survey.
Barriers to Adoption
However, among the most significant technical barriers to increased Go language adoption are missing features and lack of ecosystem/library support.
“We asked for more details on what features or libraries respondents were missing and found that generics was the most common critical missing feature — we expect this to be a less significant barrier after the introduction of generics in Go 1.18,” wrote Alice Merrick, a user experience researcher at Google, in a post on the Go Blog discussing the 2021 survey. “The next most common missing features had to do with Go’s type system.”
Generics and Fuzzing
The Go community added generics to the Go language in release 1.18 of the language. Release 1.18, delivered last month, provides new features to enhance security and developer productivity, and improve the performance of Go.
Steve Francia, Google Cloud’s Product & Strategic Lead for Go, called the new update “monumental” and said generics was the most sought-after feature by developers.
“With generics, this specific feature has been the most sought-after feature in go for the last 10 years,” Francia said. “And we’re really happy to be able to provide it to our users and to give them the ability to simplify their applications and provide them better performance.”
The 1.18 release also brought support for workspaces, native fuzzing and a 20% improvement in performance.
In addition, the survey showed that the biggest challenges when using modules included versioning, using private repos and multimodule workflows. However, the introduction of workspaces to the language is expected to address some of these issues.
Fuzzing is a type of vulnerability testing that throws arbitrary data at a piece of software to expose unknown errors and is emerging as a common testing scheme in enterprise development.
However, most respondents (73%) said they were not familiar with fuzzing or that it was new to them (23%).
“Based on this finding, we plan to 1) ensure Go’s fuzzing documentation explains fuzzing concepts in addition to the specifics of fuzzing in Go, and 2) design output and error messages to be actionable, so as to help developers who are new to fuzzing apply it successfully,” Merrick said.
“Rust and Go have complementary feature sets, so Rust may be a good option for when Go doesn’t meet feature needs for a project,” Merrick wrote. “The primary reasons for using Python were missing libraries and existing infrastructure support, so Python’s large package ecosystem may make it difficult to switch to Go. Similarly, the most common reason for using Java instead was because of Go’s missing features, which may be alleviated by the introduction of generics in the 1.18 release.”
The proportion of respondents deploying Go programs to the top three global cloud providers — AWS (43%), GCP (25%) and Microsoft Azure (12%) — remained about the same this year and on-prem deployments to self-owned or company-owned servers continue to decrease.
“Respondents deploying to AWS saw increases in deploying to a managed Kubernetes platform, now at 35% of those who deploy to any of the three largest cloud providers,” Merrick said. “All of these cloud providers saw a drop in the proportion of users deploying Go programs to VMs.”
Conducted between October 26 and November 16 of last year, the survey generated 11,840 responses. Only 2% of respondents said they identified as women, which is about the same proportion as in previous years.
Also, about 8% of respondents reported that they are using some form of assistive technology. “Most challenges concerned a need for higher contrast themes and increased font sizes on Go-related websites or in their code editors; we’re planning to act on the website feedback later this year,” Merrick said.
Speaking of editors, for this year’s survey, the team randomly sampled some participants using the Go VS Code plugin, which resulted in some shifts in who responded to the survey and how.
For instance, 91% of respondents who came to the survey from the VS Code plugin prefer to use VS Code when using Go. For respondents that didn’t come to the survey from the plugin, VS Code was still the favored editor, but at 42%, JetBrains’ GoLand came in second at 37% and Vim had 13%.
Dependency Management, Bug Diagnosis
Meanwhile, the top two things respondents said they would improve in Go were dependency management (using modules) and diagnosing bugs — two areas that the Go project will be dedicating resources to during this year, Merrick said.
As for challenges when working with modules, “The most common module-related challenge was working across multiple modules (19% of respondents), followed by comments about versioning (including trepidation around committing to a stable v1 API),” Merrick wrote. “Related to versioning, 9% of responses discussed version management or updating dependencies. Rounding out the top 5 were challenges around private repos (including authentication with GitLab in particular) and remembering the different go mod commands plus understanding their error messages.”
Linux Is Top Target
Moreover, the vast majority of survey respondents reported that they are working with Go on Linux (63%) and macOS (55%) systems, with 19% on Windows. The proportion of respondents who primarily develop on Linux appears to be slightly trending down over time, Merrick said. Yet, 92% of respondents said they target Linux for deployment. Even though more respondents develop on macOS than Windows, they more often deploy to Windows than macOS.