Friday, February 13, 2026

Go 1.26

Go is so minimalistic, that even small syntax improvements are big deal.

 Go 1.26 is released - The Go Programming Language

All releases - The Go Programming Language (download)

Language changes

Go 1.26 introduces two significant refinements to the language syntax and type system.

First, the built-in new function, which creates a new variable, now allows its operand to be an expression, specifying the initial value of the variable.

A simple example of this change means that code such as this:

x := int64(300)
ptr := &x

Can be simplified to:

ptr := new(int64(300))

Second, generic types may now refer to themselves in their own type parameter list. This change simplifies the implementation of complex data structures and interfaces.



Redefining Go Functions | pboyd.io

No comments: