Every year Go officials organize a survey of Go developers, and last year was no exception. But after I finished the investigation and collected the information, I disappeared...otherwise, the community and friends at a certain time would ask me where they could see it.
No, recently the official finally released the "Go Developer Survey 2021 Results[1]", I translated it directly (some are deleted (minus, only the key content is shown), you can take a look and understand the development of Go community.
Go Developer Survey Results
Highlights
Most Responses were consistent with previous years. For example, satisfaction with Go remains high at 92%, and 75% of respondents use Go at work. This year we randomly sampled some participants using the Go VSCode plugin, which resulted in some changes in who responded to the survey. Lack of key libraries, language features, and infrastructure are the most common barriers to using Go. (Note: This survey was conducted before Go1.18 was released, with generics being the number one missing feature in the report) Respondents wanted to prioritize improvements in debugging and Dependency management. The biggest challenges when working with modules are version management, using private repositories, and multi-module workflows. (Note: this survey was conducted before Go 1.18, which introduced workspaces and solved many of these problems). 81% of respondents are confident in the long-term direction of the Go project.
Whose voice did we listen to?
Our demographics have remained stable year over year (see 2020 results). Consistent with previous years, Go is primarily used in the technology industry. 70% of respondents are software developers, with a few in IT or DevOps, and 76% say they program in Go at work.



Some new demographic data for 2021:
The majority of respondents described their organization as an enterprise or small to medium-sized enterprise, with about a quarter describing their organization as a start-up. This is much less the case for consultancies and public agencies. The vast majority of respondents work in teams of less than 10 people. More than half (55%) of respondents use Go at work every day. Respondents use Go less frequently outside of work.



We asked respondents if they had evaluated alternatives to Go in the past year. 43% of respondents said they had evaluated switching to Go or adopting Go without an established language before. 80% of these evaluations are primarily for business reasons.




We want to see how introducing generics affects or addresses underlying needs around Go's type system before making more changes.
Currently, we will gather more information about the background of these requirements and may explore different ways to meet these requirements in the future, such as through tools, libraries, or modifications to the type system.
As for the missing libraries, there is no clear consensus on what kind of libraries would be added that would unlock the biggest percentage of people who want to adopt Go. This requires further exploration.
So, when respondents don’t choose Go, what do they choose instead?

Rust, Python, and Java are the most common choices.
Rust and Go have complementary feature sets, so when Go doesn’t meet a project’s functional needs, Rust may be a good choice.
The main reason to use Python is the lack of libraries and existing infrastructure support, so Python's large package ecosystem may make it difficult to convert to Go.
Similarly, the most common reason for using Java is missing functionality in Go, which may be alleviated by the introduction of generics in version 1.18.
Go Satisfaction and Prioritization
Let’s look at what Go does well and where it can improve.
Consistent with last year, 92% of respondents said they were very satisfied or somewhat satisfied with their use of Go in the past year.

This year, we’re introducing a new question to explore other ways to prioritize work in specific areas.
Question: "Suppose you had 10 GopherCoins that could be used to improve the following aspects of Go's work. How would you allocate your coins?"
Two areas that stand out are dependency management ( using modules) and diagnosing errors, these are areas where we will invest resources in 2022.

The most common challenges with Go dependency management are:
Working across multiple modules (19% Respondents). is a comment about versions (including fears about the promised stable V1 version of the API).
Related to versions, 9% of responses discussed version management or updating dependencies. Rounding out the top five were challenges around private repositories (including certification for GitLab) and remembering different go mod commands and understanding their error messages.
Developer Tools and Practices
As in previous years, the vast majority of respondents reported running on Linux (63%) and macOS (55%) systems Use Go. There appears to be a slight downward trend in the proportion of respondents who primarily develop on Linux over time.

Of the respondents surveyed who use the VSCode plugin, 91% prefer using VSCode when using Go.

Target (Deployment) Platform
Over 90% of respondents target Linux! Although more respondents develop on macOS than Windows, they more often deploy to Windows than macOS.

Summary
Overall review of our 2021 developer survey results To reiterate, some key takeaways.
Most of our year-over-year metrics remain stable, with most changes due to changes in our sample. Satisfaction with Go remains high! Three-quarters of respondents use Go at work, and many use it every day We all use Go, so helping you get your work done is a top priority. We will prioritize improvements to debugging and dependency management workflows. We will continue to work hard to make Go an inclusive community for Gophers of all kinds.
To put it simply, it is thriving, and most people are satisfied with Go.
The biggest contradiction is generics and dependency management. Generics have been released in Go1.18, dependency management continues to be improved, and debugging tool optimization will also be increased.
The above is the detailed content of '2021 Go Official Developer Survey Report'. For more information, please follow other related articles on the PHP Chinese website!

Go's "strings" package provides rich features to make string operation efficient and simple. 1) Use strings.Contains() to check substrings. 2) strings.Split() can be used to parse data, but it should be used with caution to avoid performance problems. 3) strings.Join() is suitable for formatting strings, but for small datasets, looping = is more efficient. 4) For large strings, it is more efficient to build strings using strings.Builder.

Go uses the "strings" package for string operations. 1) Use strings.Join function to splice strings. 2) Use the strings.Contains function to find substrings. 3) Use the strings.Replace function to replace strings. These functions are efficient and easy to use and are suitable for various string processing tasks.

ThebytespackageinGoisessentialforefficientbyteslicemanipulation,offeringfunctionslikeContains,Index,andReplaceforsearchingandmodifyingbinarydata.Itenhancesperformanceandcodereadability,makingitavitaltoolforhandlingbinarydata,networkprotocols,andfileI

Go uses the "encoding/binary" package for binary encoding and decoding. 1) This package provides binary.Write and binary.Read functions for writing and reading data. 2) Pay attention to choosing the correct endian (such as BigEndian or LittleEndian). 3) Data alignment and error handling are also key to ensure the correctness and performance of the data.

The"bytes"packageinGooffersefficientfunctionsformanipulatingbyteslices.1)Usebytes.Joinforconcatenatingslices,2)bytes.Bufferforincrementalwriting,3)bytes.Indexorbytes.IndexByteforsearching,4)bytes.Readerforreadinginchunks,and5)bytes.SplitNor

Theencoding/binarypackageinGoiseffectiveforoptimizingbinaryoperationsduetoitssupportforendiannessandefficientdatahandling.Toenhanceperformance:1)Usebinary.NativeEndianfornativeendiannesstoavoidbyteswapping.2)BatchReadandWriteoperationstoreduceI/Oover

Go's bytes package is mainly used to efficiently process byte slices. 1) Using bytes.Buffer can efficiently perform string splicing to avoid unnecessary memory allocation. 2) The bytes.Equal function is used to quickly compare byte slices. 3) The bytes.Index, bytes.Split and bytes.ReplaceAll functions can be used to search and manipulate byte slices, but performance issues need to be paid attention to.

The byte package provides a variety of functions to efficiently process byte slices. 1) Use bytes.Contains to check the byte sequence. 2) Use bytes.Split to split byte slices. 3) Replace the byte sequence bytes.Replace. 4) Use bytes.Join to connect multiple byte slices. 5) Use bytes.Buffer to build data. 6) Combined bytes.Map for error processing and data verification.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
