Go 1.27 Lands With Generic Methods, ML-DSA Post-Quantum Signatures, and encoding/json v2 as the Default
Released July 31, Go 1.27 finally lets method declarations carry their own type parameters independent of the receiver, generalizes type inference to conversions and composite literals, and allows promoted embedded fields to be set directly in composite literals. Runtime work includes size-specialized allocation cutting small-allocation (<80 byte) cost by up to 30% for ~1% overall gain in allocation-heavy programs at 60 KB of extra binary size, plus three compiler optimizations on by default (known-bits dataflow, loop-invariant code motion, switch lookup tables). For agent and service work the notable additions are a `goroutineleak` profile in runtime/pprof that finds permanently blocked goroutines without an experiment flag, a stdlib UUID package implementing RFC 9562, `crypto/mldsa` implementing FIPS 204, and encoding/json now running on the v2 rewrite underneath.
↳ Follow the thread