Iterators and Ranges: Comparing C++ to D to Rust
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Jun 14 16:19:35 UTC 2021
On Monday, 14 June 2021 at 16:02:18 UTC, Ola Fosheim Grøstad
wrote:
> cluttered code. At this point, table pointers ("C++ iterators")
> make the code less cluttered. So, there is an advantage to "C++
> ranges" that can be decomposed into table pointers.
Of course, the _big disadvantage_ with "C++ iterators" as
specc'ed is that it is time-consuming to implement all the
requirements. Can easily be 400 lines or more.
Compare this to a Python Generator based on coroutines with
```yield``` or C++ stack-less coroutines with ```co_yield```...
More information about the Digitalmars-d
mailing list