HeadlinesBriefing favicon HeadlinesBriefing.com

Go 1.27 Released with Generics, JSON v2, ML-DSA

Hacker News •
×

The Go team has released Go 1.27, bringing major enhancements across the language, toolchain, runtime, and standard library. Available via the official download page, this version introduces significant language changes including support for generic methods, direct initialization of nested struct fields, and generalized function type inference.

Language updates allow generic methods like `NInt` to work across all integer types, eliminating the need for type-specific variants. Struct literals can now use keys from embedded or nested structs directly. Function type inference extends to composite literals, type conversions, and channel sends.

Performance improvements include size-specialized memory allocation reducing small object costs by up to 30%. The goroutine leak profile is now generally available in runtime/pprof. New standard library packages include encoding/json/v2 for high-level JSON processing, crypto/mldsa implementing post-quantum ML-DSA signatures, and uuid for native UUID support. Additional packages like simd and net/http/httptest enhance SIMD capabilities and testing infrastructure.

The release also updates go doc to support package version queries, streamlines go.mod structure, and adds modernizers like atomictypes and embedlit. Follow-up blog posts will detail specific features in coming weeks.