Notes from Naoki Kuroda’s GopherCon 2026 talk, “Loosening the Reins: Go Generics Get More Flexible.”
The talk starts from one line in the Go 1.26 release notes:
type Ordered[T Ordered[T]] interface { ... }
A constraint that refers to itself. Go 1.25 rejected it as an invalid
recursive type; Go 1.26 accepts it. Kuroda went through the spec
history, issues, and the go/types checker to find out what changed —
and the answer wasn’t “we found a clever fix.” The original rule had
simply been drawn wider than the problem it was guarding against.
The pattern, repeated
That turned out to be the shape of every generics relaxation since 1.18:
- Go 1.20 — relaxed rules around comparable, letting more types satisfy constraints that had been over-restricted.
- Go 1.25 — further loosening in the type checker.
- Go 1.26 — self-referential constraints, the example above.
- Go 1.27 — methods can declare their own type parameters, and function type inference generalizes to every context where a generic function is assigned to a matching function type.
Each time the question was the same: what problem was the original restriction actually preventing? And each time the honest answer was that the rule caught the real problem plus a lot of valid code alongside it.
Why the rules started strict
This is the part worth internalizing. Generics landed in 1.18 with conservative rules on purpose. Restrictions can be removed later without breaking anyone’s code; permissions cannot. A rule that turns out to be too tight is an annoyance you can fix in a later release. A rule that turns out to be too loose is a compatibility promise you’re stuck with under Go 1’s guarantee.
So the loosening isn’t the type checker catching up to what it should have allowed all along. It’s the plan working as intended.
What it means in practice
If you hit a puzzling “this is not allowed” from the type checker, there are now two live possibilities rather than one. It might be protecting you from something genuinely unsound. Or it might be a rule that outlived the problem it was written for — worth checking the issue tracker before restructuring your API around it.