<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u" -->

---
title: Go 1.26 iterators turned the simplest language into...
description: 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...
canonical: https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Go 1.26 iterators turned the simplest language into functional spaghetti | daily.dev
og:description: 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...
og:url: https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u
og:image: https://api.daily.dev/og/posts/wLSdLR14u.png
og:image:alt: Go 1.26 iterators turned the simplest language into functional spaghetti
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Go 1.26 iterators turned the simplest language into functional spaghetti

**[Awesome Go](https://daily.dev/sources/awego)** · 4 min read · 5 upvotes · 0 comments

## Summary

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.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/adioof/go-126-iterators-turned-the-simplest-language-into-functional-spaghetti-5c4h>

## Questions this post answers

### What is range-over-func in Go and when was it introduced?

Range-over-func is an iterator feature introduced in Go 1.23, released in August 2024, letting you range over a function using iter.Seq and iter.Seq2 types instead of just slices, maps, or channels. It requires understanding push and pull iterators, yield callbacks, and boolean returns for early termination, concepts not previously needed for a basic for loop.

_Developers weighing whether to adopt Go's newer iterator syntax can track language changes like this on daily.dev._

### Are Go iterators slower than ranging over a slice or map directly?

Yes, ranging over a custom iterator is generally somewhat slower than ranging directly over a slice or map, according to a benchmark by Google Developer Expert Val Deleplace in September 2024. A separate study by Rost Glukhov in January 2025 found custom iterators rarely execute faster than classical approaches, concluding the choice mostly comes down to aesthetic preference rather than performance.

_For teams deciding between idiomatic loops and iterator abstractions, daily.dev surfaces performance trade-off discussions like this one._

### What new iterator methods did Go 1.26 add to the reflect package?

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. This made iterator patterns pervasive across the standard library, even for developers who never explicitly opted into range-over-func.

_Go developers tracking standard library changes across versions can follow reflect package updates like this on daily.dev._

## Similar posts on daily.dev

- [Go 1.26 interactive tour](https://daily.dev/posts/go-1-26-interactive-tour-tqewwqutn) · Anton Zhiyanov · 162 upvotes · 3 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#golang](https://daily.dev/tags/golang), [#language-design](https://daily.dev/tags/language-design)

[View this post on daily.dev](https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Go 1.26 iterators turned the simplest language into functional spaghetti","url":"https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u"},"datePublished":"2026-08-20T20:15:43.639Z","dateModified":"2026-09-14T08:50:21.740Z","description":"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...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d3bbfdc286b29cad8a0479f13b850bc2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d3bbfdc286b29cad8a0479f13b850bc2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Awesome Go","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Awesome Go","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/awego","url":"https://daily.dev/sources/awego"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,golang,language-design","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Awesome Go","item":"https://daily.dev/sources/awego"},{"@type":"ListItem","position":3,"name":"Go 1.26 iterators turned the simplest language into functional spaghetti"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/go-1-26-iterators-turned-the-simplest-language-into-functional-spaghetti-wlsdlr14u#faq","mainEntity":[{"@type":"Question","name":"What is range-over-func in Go and when was it introduced?","acceptedAnswer":{"@type":"Answer","text":"Range-over-func is an iterator feature introduced in Go 1.23, released in August 2024, letting you range over a function using iter.Seq and iter.Seq2 types instead of just slices, maps, or channels. It requires understanding push and pull iterators, yield callbacks, and boolean returns for early termination, concepts not previously needed for a basic for loop. Developers weighing whether to adopt Go's newer iterator syntax can track language changes like this on daily.dev."}},{"@type":"Question","name":"Are Go iterators slower than ranging over a slice or map directly?","acceptedAnswer":{"@type":"Answer","text":"Yes, ranging over a custom iterator is generally somewhat slower than ranging directly over a slice or map, according to a benchmark by Google Developer Expert Val Deleplace in September 2024. A separate study by Rost Glukhov in January 2025 found custom iterators rarely execute faster than classical approaches, concluding the choice mostly comes down to aesthetic preference rather than performance. For teams deciding between idiomatic loops and iterator abstractions, daily.dev surfaces performance trade-off discussions like this one."}},{"@type":"Question","name":"What new iterator methods did Go 1.26 add to the reflect package?","acceptedAnswer":{"@type":"Answer","text":"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. This made iterator patterns pervasive across the standard library, even for developers who never explicitly opted into range-over-func. Go developers tracking standard library changes across versions can follow reflect package updates like this on daily.dev."}}]}
```

