Iterators and Ranges: Comparing C++ to D to Rust

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Mon Jun 14 23:08:40 UTC 2021


On Monday, 14 June 2021 at 22:56:29 UTC, IGotD- wrote:
> How do we classify the iterators of Nim?
>
> https://nim-lang.org/docs/tut1.html#iterators
>
> It looks similar to Python and Rust. Also notice how it can use 
> yield like a coroutine.

Yes, but the page says that they have to be inlined and used in 
for-loops only? But if they are made more general then they would 
be generator coroutines like Python and C++.





More information about the Digitalmars-d mailing list