Go generic methods and the interface boundary
A compact explanation of what Go 1.27's generic methods fix, and why interfaces still cannot declare generic methods.
Links: Original source
Logged at IST: 2026-08-26 10:14 IST
What it is: Dominik Honnef's explanation of generic methods in Go 1.27.
Gist: Go 1.27 removes a long-standing awkwardness in Go generics: methods on concrete types can now declare their own type parameters. That means an API like Node[T].Map[U] no longer has to pollute the receiver type with a U that only one method needs, or move the operation out into a package-level helper function.
The interesting part is the boundary Go keeps. Interfaces still cannot declare generic methods, and a concrete generic method does not satisfy a matching interface method. Honnef's explanation is the implementation-model mismatch: generic instantiations are selected at compile time, while interface dispatch and reflection happen at runtime. If an interface could ask for Map[U], the compiler would not have a finite, visible set of method instantiations to generate.
So the feature improves concrete API shape without making Go's interface model more magical. Generic methods are real, but they are intentionally not a new form of dynamically dispatched generic interface method.
Newsletter angle: Useful follow-up to the broader Go 1.27 notes: generic methods make APIs cleaner, but Go is keeping the feature bounded by its runtime interface model.