Connect with us

Tech News

Programming language: Go developers rely on the new generics

Published

on

programming language go developers rely on the new generics.jpg

According to a study, the community quickly embraced the new feature. Fuzzing, on the other hand, is relatively unknown and error handling is the biggest challenge.

 

The team behind the Go programming language has released the results of its latest survey. In June 2022, more than 5,700 developers shared insights into the Go features they use or don’t use, what they struggle with, and their overall satisfaction with the programming language. Generics are known to most respondents, and just a few months after their release, a quarter are already using them.

 

Go 1.18 introduced generics in March 2022 – a feature already present in many other programming languages ​​and intended to make code sharing and program building easier. The version brought with it the biggest change in the programming language developed by Google since its open-source release. Among other things, the current survey looks at the extent to which the developer community has accepted the new feature.

The clear majority of the survey participants (86 percent) are aware of Generics in Go. Six percent know about the planned feature, but not about the implementation, and eight percent only found out about it through the survey. Around a quarter of those surveyed were already using Generics in Go at the time of the survey, around half of them in production. Another 54 percent of those surveyed are open to generics, but do not currently plan to use them. 5566 valid answers could be considered.

 

The Go developers have a variety of reasons why they do not (yet) use generics. Some are waiting for an advanced implementation that includes, for example, improved type inference or parameterized methods. Others specify dependencies on something that doesn’t handle generics, or simply find the syntax cumbersome. Of those who have used generics and provided feedback on them, one in ten people report simplified code or reduced code duplication. The most common feedback is some form of “thank you,” and only 6 percent say the new feature is negative.

Other innovations in Go 1.18 include integrated fuzzing support, which only five percent of those surveyed use. Reasons against fuzz testing include a lack of knowledge about it or the need for better documentation, lack of time and a lack of understanding of possible use cases. As such, the Go team sees room for improvement in demonstrating the value of fuzz testing, what it is good for, and how it applies to diverse codebases.

After a lack of generics was considered the greatest challenge in previous Go surveys, the support for type parameters in Go 1.18 leads to the new top challenge of error handling. It’s statistically linked to several other hurdles, according to the Go team, including the lack or under-maturity of libraries in certain domains and further revisions to the type system, including support for enums and more functional programming syntax.

 

Overall, however, the Go users surveyed show a high level of satisfaction: 63 percent are very satisfied with the programming language and 30 percent somewhat what.

For more information on the current Go Developer Survey, see the Go blog. Due to legal reasons, the Go team has not yet been able to provide the raw data, contrary to the original plan.

Copyright © 2017 Zox News Theme. Theme by MVP Themes, powered by WordPress.