Re:Fighting Rust's Expressive Type System
by masklinn on Sunday October 25, 2020 @05:28AM
(#24884969)
That seems pretty natural? The only reason why you don't have this in e.g. python is that iterators are often implemented as generators, so the "own type of iterator" is implicit. But I remember pretty much the same thing from my Java days, if you need to iterate you have to create an iterator type. It's a bit less visible due to type erasure but it's there nonetheless.
[ Parent
| on HN ]
There are no comments on this comment yet.