Articles

Worth reading

A short take on pieces worth your time — architecture, AI, system design, and engineering careers — each one linked back to its original source.

Clear

3 articles

Fixing For Loops in Go 1.22

David Chase and Russ Cox explain the Go team's fix for the loop-variable-capture footgun that's bitten essentially every Go developer who's launched goroutines from inside a for-range loop: as of Go 1.22, each iteration gets its own copy of the loop variable instead of sharing one. What I like about this post is the transparency about the tradeoffs of changing well-established language semantics after a decade, and how they made the change safely without breaking existing code. If you've ever debugged "why do all my goroutines print the same value," this is the origin story and the fix.

Sep 19, 2023 The Go Blog Golang
👍 0

Profile-guided optimization in Go 1.21

The Go team's own writeup of profile-guided optimization landing as production-ready: feed the compiler a CPU profile from real traffic, and it makes smarter inlining decisions than static heuristics ever could, often for a meaningful throughput gain with zero code changes. What I like about this piece is how matter-of-fact it is about the mechanics — collect a profile, drop it in as default.pgo, rebuild — no framework, no magic, just the compiler using data it didn't have before. A good example of Go's philosophy of boring, composable tooling done right.

Sep 5, 2023 The Go Blog Golang
👍 0

Why Discord is switching from Go to Rust

Jesse Howarth's account of Discord replacing a hand-tuned Go service with Rust because of GC-driven latency spikes their garbage collector kept reintroducing no matter how much they tuned it, and Rust, even in a fairly unoptimized first pass, beat it on latency, CPU, and memory all at once. It's a useful data point in the "when does garbage collection actually matter" debate, precisely because Discord weren't chasing a rewrite for its own sake; they had one specific, isolated, latency-sensitive service where GC pauses were directly user-visible. Refreshingly narrow in scope rather than a blanket "Rust is better" argument.

Feb 4, 2020 Discord Engineering Blog GolangArchitecture
👍 0