You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only reason to prefer internal iterators is the difficulty of implementing an external one for recursive data types and often for mutable iterators. We can still provide adaptors for composing internal iterators (iter.rs) but there's no need to provide internal iterators ourselves side-by-side with external iterators.
I think we should throw out the dozens of internal iterators we have on str and vec since they already have a mutable and immutable external iterator. We just need iterators for reverse traversal and the internal ones will be entirely redundant.
For example, there's no need for hardcoded internal iterators like each2 when we have xs.zip(ys) for any two arbitrary iterators - not just two vectors.
The only reason to prefer internal iterators is the difficulty of implementing an external one for recursive data types and often for mutable iterators. We can still provide adaptors for composing internal iterators (
iter.rs
) but there's no need to provide internal iterators ourselves side-by-side with external iterators.I think we should throw out the dozens of internal iterators we have on
str
andvec
since they already have a mutable and immutable external iterator. We just need iterators for reverse traversal and the internal ones will be entirely redundant.For example, there's no need for hardcoded internal iterators like
each2
when we havexs.zip(ys)
for any two arbitrary iterators - not just two vectors.See: https://mail.mozilla.org/pipermail/rust-dev/2013-June/004364.html
The text was updated successfully, but these errors were encountered: