• Sources: Go 1.27 release announcement, HN discussion
  • Summary: Go 1.27 adds generic methods and generalized function type inference, which changes what a library API can express and gives package authors a migration path callers will eventually see. The existing encoding/json package is now backed by the v2 implementation, so the new unmarshaling engine arrives on upgrade rather than through a separate import path. crypto/mldsa implements FIPS 204 and is wired into crypto/x509 and crypto/tls, a uuid package lands in the standard library, and size-specialized allocation cuts the cost of sub-80-byte allocations by up to 30 percent, which the release post puts at roughly 1 percent overall improvement for allocation-heavy programs.
  • Comments: One HN commenter reports that golangci-lint and gopls break on code using generic methods.
  • Why it matters: The json change is not opt-in, so every Go program moves onto a new unmarshaling engine the moment it upgrades.
  • Follow-up: Track tooling support for generic methods in gopls and golangci-lint.

send feedback on this story