Update
Aug 13, 2024
tracked by
Updatify
Introduction to Go 1.23
The latest Go release, version 1.23, arrives six months after Go 1.22.
Most of its changes are in the implementation of the toolchain, runtime, and libraries.
As always, the release maintains the Go 1 promise of compatibility.
We expect almost all Go programs to continue to compile and run as before.
Changes to the language
The “range” clause in a “for-range” loop now accepts iterator functions of the following types
func(func() bool)
func(func(K) bool)
func(func(K, V) bool)
as range expressions.
Calls of the iterator argument function produce the iteration values for the “for-range” loop.
For details see the iter package documentation, the language spec, and the Range over Function
Types blog post.
For motivation see the 2022 “range-over-func” discussion.
Go 1.23 includes preview support for generic type aliases.
Building the toolchain with GOEXPERIMENT=aliastypeparams enables this feature within a package.
(Using generic alias types across package boundaries is not yet supported.)
Tools
Telemetry
Starting in Go 1.23, the Go toolchain can collect usage and breakage
statistics that help the Go team understand how the Go toolchain is