Iterators and Generators
Discussions compare iterators, generators, and related features like itertools across programming languages such as Python, Rust, Go, Nim, JavaScript, and Ruby, focusing on implementations, use cases, and alternatives.
Activity Over Time
Top Contributors
Keywords
Sample Comments
This really just an argument for using iterator generators. Does Go offer those yet?
What's wrong with Nim's iterators?
Are internal iterators still possible?
Or iterators/generators and itertools.
Python iterators also give you lazy transformation and no intermediate data structures, no?
A nice use case for sure. Seems possible with some kind of iterator/generator wrapper rather than the mess in the OP however.
Does JavaScript have adapters to covert lists into generators or lazy iterators?
You mentioned itertools twice. Accident or pun intended?
What about iterators/yield?
Typo in this sentence: However, it is also possible - in contrast to generators - to iterate over those multiple times if needed, it is aonly not so efficient.