Go 1.22 Release Candidate 1 is released

314 views
Skip to first unread message

anno...@golang.org

unread,
Dec 19, 2023, 6:43:36 PM12/19/23
to golan...@googlegroups.com

Hello gophers,

We have just released go1.22rc1, a release candidate version of Go 1.22.
It is cut from release-branch.go1.22 at the revision tagged go1.22rc1.

Please try your production load tests and unit tests with the new version.
Your help testing these pre-release versions is invaluable.

Report any problems using the issue tracker:
https://go.dev/issue/new

If you have Go installed already, an easy way to try go1.22rc1
is by using the go command:
$ go install golang.org/dl/go1.22rc1@latest
$ go1.22rc1 download

You can download binary and source distributions from the usual place:
https://go.dev/dl/#go1.22rc1

To find out what has changed in Go 1.22, read the draft release notes:
https://tip.golang.org/doc/go1.22

Cheers,
Than and Carlos for the Go team

John David Lee

unread,
Dec 24, 2023, 11:43:23 AM12/24/23
to golang-nuts
Hello.

In the rangefunc experiment document the iter package is said to export the following:

type Seq[V any] func(yield func(V) bool) bool
type Seq2[K, V any] func(yield func(K, V) bool) bool

But after installing tip, it looks like the iter package exposes a slightly different interface:

type Seq[V any] func(yield func(V) bool)
type Seq2[K, V any] func(yield func(K, V) bool)

Take care,

David

John David Lee

unread,
Dec 24, 2023, 11:44:51 AM12/24/23
to golang-nuts
This is in the section titled "Why are yield functions limited to at most two arguments?"

Andrew Harris

unread,
Dec 24, 2023, 7:25:39 PM12/24/23
to golang-nuts
There was some discussion on the GitHub issue(s) that the trailing outer bool is perhaps not adding much in actual usage, shortly after the experiment document. Signatures changed to drop the outer bool, and appearances in docs are vestigial.

Of the trailing inner, outer booleans: The inner bool is the one associated with per-step iteration logic, signaling whether anything is coming out or not. The outer bool says ... something? ... about the state of the iteration w/o respect to steps. My sense is that it's less clear what the outer bool meant. Notably, when putting the iterating function in for/range syntax it's not always clear from obvious principles where the return gets checked, and for various kinds of fallible iterators it's not clear that there's a uniform way to expose different underlying logic about what it means or what to do if the outer bool returned 'false'.
Reply all
Reply to author
Forward
0 new messages