Why “iterators” is being discussed
The most recent Hacker News stories and comments contributing to this topic's mentions.
Thanks! Well at first I did not have much structure, I just went full procedural and did what I needed to do at each step. It was an ugly, long chain of loops and switches. Then…
by tack1234 · Sep 22, 2026
I am sure there's a way to filter directly on cond variable and collect isn't needed most of the time since iterators are way more useful in general (unless you want to print th…
by himata4113 · Sep 19, 2026
.len doesn't work on a list (because it might mislead you about the efficiency of the operation if it did exist), so it's better to use iterators - so then you can change the un…
by matja · Sep 19, 2026
“ The language is different from Rust (who could’ve thought that, yeah), but it left a genuinely good impression. It’s straightforward, modern, and blazingly fast. I believe it…
by gigatexal · Sep 19, 2026
What about fold? In rust iterators there's both fold (you supply the initial value) and reduce (it uses the first element as the initial value, doesn't work on empty iterators)…
by nextaccountic · Sep 17, 2026
Actually, now that I think about it, with this new(-ish) (in)famous walrus operator and itertools recipes, I could sort of emulate reduce using gen expr First, I will need to st…
by vova_hn2 · Sep 17, 2026
Interest
Proportion of Hacker News items mentioning "iterators" over time.
Mentions
Total number of Hacker News items mentioning "iterators" over time.
In computer programming, an iterator is an object that progressively provides access to each item of a collection, in order. Read more on Wikipedia