Join me in less than an hour, when I’ll be live streaming again! I’ll be continuing to add SQLite support to Kivik, using Test-Driven Development.
Go 1.22 was released on February 7. So I’m a bit behind on talking about the changes introduced to the spec. But better late than never! If you’re interested in my thoughts on some of the other changes, including those to the standard library, check out last week’s episode of the Cup o’ Go podcast.
But for the purposes of this series on the Go spec, there are a few noteworthy changes:
-
The spec now contains notations indicating which version of Go introduced a new feature or change. For example:
Operators and punctuation
The following character sequences represent operators (including assignment operators) and punctuation [Go 1.18]:
And these links in turn jump to an abbreviated list of changes for the relevant Go version. Handy!
-
They fixed the typo I called out last month, although no thanks to me. I never filed a bug report. Glad someone else is on top of their game! (Actually, the fix was already committed before I had even noticed… just not yet published.)
-
Finally, and most important, they’ve made two changes to the way loops work:
- In a “for” statement, each iteration has its own set of iteration variables rather than sharing the same variables in each iteration.
- A “for” statement with “range” clause may iterate over integer values from zero to an upper limit.
However, neither of these changes relate to a part of the spec we’ve yet gone over in this series, so there’s nothing to go back and update. We’ll be getting to for loops fairly soon though.
Aside from these changes, the other changes made to the spec were mostly cosmetic. Adding new links, formatting, and occasionally expanding examples. I’m not going to iterate them all, though. That would be boring.
Quotes from The Go Programming Language Specification Language version go1.22 (Feb 6, 2024)