Go 1.26 iterators turned the simplest language into functional spaghetti

This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).

An opinion piece argues that Go's range-over-func iterators, introduced in Go 1.23 (August 2024) and expanded in the reflect package with Go 1.26 (February 2026), betray Go's original design philosophy of simplicity. The author cites benchmarks from Val Deleplace and Rost Glukhov showing custom iterators are typically slower than direct loops, and points to community division over whether the feature is elegant or a mistake. A top comment pushes back, noting the writer's own 63k-line Go 1.26 codebase uses zero iter.Seq instances and arguing the addition is optional rather than forced.

4m read timeFrom dev.to
Post cover image
Table of contents
The language that bragged about being boringThen the standard library drank the Kool-AidThe part nobody wants to hear: it's slowerGo is speedrunning Rust envyComplexity you can hide is still complexityThe takeaway

Questions this post answers

What did Go 1.23 introduce for iterators and what is range over func?

Go 1.23, released in August 2024, introduced range-over-func iterators using the iter.Seq and iter.Seq2 types, letting you range directly over a function. This requires understanding push and pull iterators, yield callbacks, and boolean returns for early termination, concepts not previously needed to write a basic Go for loop. Track how new Go releases reshape everyday loop code by following golang updates on daily.dev.

Are Go iterators slower than a regular for loop over a slice or map?

Yes, ranging over an iterator is measurably slower than ranging directly over a slice or map. Google Developer Expert Val Deleplace benchmarked this in September 2024, and a January 2025 study by Rost Glukhov found custom iterators rarely execute faster than the classical approach, concluding the choice mostly comes down to aesthetic preference rather than performance. Developers weighing iterator abstractions against raw loops can compare tradeoffs like this on daily.dev.

What changed in the Go 1.26 reflect package related to iterators?

Go 1.26, released in February 2026, revamped the reflect package to add iterator-based methods including Type.Fields, Type.Methods, Value.Fields, and Value.Methods, sitting alongside the older NumField and Field(i) loop-based approach rather than replacing it. By August 2026 iterator usage had spread widely across libraries and code reviews in the Go ecosystem. Keep up with reflect package and standard library shifts in Go by tracking golang releases on daily.dev.

2.6K Impressions