p.enthalabs

Go 1.26 Quietly Fixed the Things That Were Actually Annoying

**Most release notes read like change logs. This one reads like a list of apologies. Here’s what changed, why it matters, and what you can ignore.**

![Image 1: Cheikh seck](https://cheikhhseck.medium.com/?source=post_page---byline--5b4876071f04---------------------------------------)

6 min read

5 hours ago

--

I read the Go 1.26 release notes the way I read most release notes: skimming for the headline feature, ignoring the rest, and going back to my code.

Then I read them again.

What I noticed the second time is that almost nothing in 1.26 is flashy. There’s no new language feature that will trend on Hacker News. There’s no “Go gets async” moment. What there is, instead, is a release that quietly fixes the things that have been annoying Go developers for years — and ships one genuinely important runtime change that almost every production service will benefit from.

Let me walk you through what actually changed, what you should care about, and what you can safely ignore.

Press enter or click to view image in full size

!Image 2

The headline: Green Tea is now the default garbage collector

If you only read one section of this article, read this one.

Go 1.25 shipped the Green Tea garbage collector as an opt-in experiment. Go 1.26 makes it the default. The Go team is reporting **10–40% reduction in GC overhead** in real-world programs, with another ~10% on top of that if you’re running on Intel Ice Lake or AMD Zen 4 or newer (because the new collector uses vector instructions for scanning small objects).

I want to be careful with that number because “10–40%” is the kind of range that means nothing without context. Here’s the context: this is the reduction in _time spent in GC_, not the reduction in total runtime. If your service spends 20% of its CPU in GC, you’re looking at dropping to somewhere between 12% and 18%. That’s not a rewrite. That’s a free lunch.

You don’t need to do anything to get this. If you upgrade to 1.26, your service gets it. If you were already running with `GOEXPERIMENT=greenteagc` in 1.25, you can remove that flag.

The language change you’ll actually use: `new()` with an expression

This is small. It’s also the change I’ve been wanting for years.

In Go 1.26, the built-in `new` function accepts an expression as its operand:

func personJSON(name string, born time.Time) ([]byte, error) {

return json.Marshal(Person{

Name: name,

Age: new(yearsSince(born)), // ← this is new

})

} Before 1.26, you had to write this as a two-step:

age := yearsSince(born)

return json.Marshal(Person{

Name: name,

Age: &age,

})

The use case is narrow but real: any time you have a pointer-to-optional-value field (JSON, protobuf, gRPC), you can now populate it inline. It’s the kind of change that doesn’t show up in benchmarks but shows up in every code review you’ve ever done.

The generics change you’ll probably never use directly

The restriction that a generic type can’t refer to itself in its own type parameter list has been lifted:

type Adder[A Adder[A]] interface {

Add(A) A

}

This is the kind of feature that library authors will love and application developers will never type. If you’re building a math library or a collection framework, this unlocks cleaner abstractions. If you’re building web services, you can skip this section.

The tool change that will save you hours: `go fix` is reborn

This is the change I’m most excited about, and it’s the one nobody is talking about.

`go fix` has been rewritten from scratch. It's now the home of Go's **modernizers** — dozens of automated fixers that update your code to use modern idioms and APIs. It uses the same analysis framework as `go vet`, which means the diagnostics you already trust can now suggest and apply fixes.

The killer feature is the source-level inliner. If you maintain a library and want your users to migrate to a new API, you can write a `//go:fix inline` directive and `go fix` will rewrite their code automatically.

In practice, this means:

- **Upgrading a Go project to 1.26** is now `go fix ./...` away from using the new idioms.

- **Migrating off deprecated APIs** is no longer a manual grep-and-replace.

- **Library authors** can ship breaking changes with an automated migration path.

If you’ve ever maintained a large Go codebase and dreaded the “upgrade Go version” PR, this is for you.

The smaller runtime changes worth knowing

Three other runtime changes shipped in 1.26:

Get Cheikh seck’s stories in your inbox

Join Medium for free to get updates from this writer.

Remember me for faster sign in

**Faster cgo calls.** If you have a Go service that calls into C libraries (database drivers, image processing, anything that wraps a C API), cgo overhead just got cheaper. The Go team hasn’t published exact numbers, but the change targets the per-call overhead that adds up in hot paths.

**Heap base address randomization.** A security hardening change. The heap base address is now randomized, which makes certain memory-corruption exploits harder. You won’t notice this in your code. Your security team will notice it in their threat model.

**Experimental goroutine leak profile.** A new `pprof` profile type that detects goroutine leaks. This is experimental, so don't bet your production debugging on it yet, but it's worth trying on your test suite.

The standard library additions

Three new packages shipped:

`crypto/hpke` — Hybrid Public Key Encryption. If you've ever needed to encrypt data to a public key without a prior key exchange, this is the standard. It's now in the standard library instead of being a third-party dependency.

`simd/archsimd` (experimental) — SIMD primitives. If you've ever wanted to write vectorized code in Go without dropping into assembly, this is the foundation. It's experimental, so the API will change, but the direction is clear: Go is getting serious about CPU-level performance.

`runtime/secret` (experimental) — A package for managing secrets without exposing them in stack traces, panic messages, or logs. This is the kind of thing that should have existed years ago. It's experimental, but if it ships as-is, it's a real security improvement.

The tooling cleanup

Twochanges you should know about:

`cmd/doc`**and**`go tool doc`**are deleted.** Use `go doc` instead. Same flags, same behavior. If you have scripts that call `go tool doc`, update them.

`pprof`**web UI defaults to flame graphs.** If you preferred the old graph view, it's still there under View → Graph, or at `/ui/graph`.

The real takeaway

Go 1.26 isn’t a release that will generate conference talks. It’s a release that will make your existing code faster, your upgrades easier, and your code base cleaner — without you having to do anything.

The Green Tea GC alone is worth the upgrade. The `go fix` rewrite is worth the upgrade. The `new(expr)` change is worth the upgrade. Pick any one of them and the upgrade pays for itself.

The boring releases are the ones that matter most.