On March 15, 2022, the Go core team announced the release of Go 1.18, which its official blog called “a huge milestone for the entire Go community”. In this release, the Go core team made the biggest syntax feature change since the Go language became open source - adding support for generics.
Here is a brief summary of the major updates in Go 1.18.
Generics: In Go 1.18, new support for generic code that uses parameterized types was introduced. Support for generics is the most frequently requested feature added to Go, and this release provides the generic support that most users need today. Subsequent releases will continue to provide additional support for more complex generic use cases, and Go provides an official generic tutorial to help developers understand this new feature and explore ways to use generics to optimize and simplify their code.
Fuzzing: With the release of Go 1.18, Go became the first major programming language to fully integrate fuzz testing into its standard toolchain. This means that, unlike other languages, no third-party support integration is required. As a way to test for software vulnerabilities, the integration of fuzzing tests adds an extra layer of security to Go’s code, which is clearly critical especially nowadays as cyber attacks continue to escalate in frequency and sophistication.
In Go’s fuzz testing, the code is tested using random data to try to identify vulnerabilities or inputs that cause crashes. Some examples of vulnerabilities that can be discovered through fuzz testing include SQL injections, buffer overflows, denial of service, and cross-site scripting attacks. go also provides an official fuzz testing tutorial to help users understand the use of this new feature.
Workspaces: Currently, Go modules have been almost universally accepted and adopted. In the Go team’s 2021 user survey, the most common challenge with Go modules was working across multiple modules, which was addressed in Go 1.18 with the new Go workspace mode, which makes working across multiple modules easy.
20% performance improvement: This is absolutely great news for Apple M1, ARM64 and PowerPC64 users. Thanks to the extension of Go 1.17’s register ABI calling convention to these architectures, Go 1.18 delivers CPU performance improvements of up to 20%.
More detailed information about this release can be found in the Go 1.18 release notes (https://go.dev/doc/go1.18).
A short history of Go language development
In September 2007, Rob Pike replied to Robert Griesemer and Ken Thompson with an email about a new programming language, still in prototype form, and suggested that it be called Go. After finalizing the name, Rob, Robert, and Ken began working on it internally at Google.
In May 2008, the development of Go received full support from Google.
On November 10, 2009, the Go project team released the language publicly for the first time and made the code fully open source, which was also designated as Go’s official birthday. The source code was initially hosted on http://code.google.com before being gradually migrated to GitHub over the next few years.
In 2011, the first stable version of the Go language, r56, was released.
In 2012, the first official version of Golang, Go1, was released.
2013: Go 1.1 and Go 1.2 are officially released.
2014: Go 1.3 and Go 1.4 are officially released.
2015: Go 1.5 official release.
2016: Go 1.6 and Go 1.7 official releases.
2017: Go 1.8 and Go 1.9 official releases.
2018: Go 1.10 and Go 1.11 official releases.
2019: Go 1.12 and Go 1.13 official releases.
2020: Go 1.14 and Go 1.15 official releases.
2021: Go 1.16 and Go 1.17 official releases.
As you can see, the Go language has been updated once every six months since it started its development. In summary, Go has been open source for more than 12 years now, but its development process has been rather tortuous despite its backing. It initially gained some attention when it was released, then started to go downhill until 2015 when it was redesigned and optimized for GC implementation, and then regained popularity in 2016, and now it remains among the mainstream programming languages.
Currently, the Go language is also very popular in China. On the one hand, it is based on its efficient development method, and on the other hand, it is because the Go language is born “for the cloud” and is unique in the era of fully embracing the cloud.
For developers, the Go language guarantees fast compilation and efficient development efficiency and program performance. Compared to the lagging weight of Java and C++, Go makes development faster, easier, and no less performant. In addition, the Go language has few features that make it easier to get started, especially for students who have a basic knowledge of C. It is less expensive to learn.
Around the world, there are many large companies and great open source projects that use Go. Some people call Go the programming language of the cloud. Because the Go language generates small binary executables that start quickly and have a small memory footprint, there is no legacy burden when running in containers. Many CNCF projects, including Kubernetes and Istio, are written in Go.
The future of the Go language is promising as infrastructure continues to cloud up.