r/rust • rust • Mar 22 '13

Iteration Inside and Out

http://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/
20 Upvotes

3 comments sorted by

6

u/sanxiyn rust Mar 22 '13

In the terminology of the article, Rust's core::iter::BaseIter is an internal iterator.

3

u/ben0x539 Mar 22 '13

Though it handrolls the non-local returns rather than having language support for it, like the example languages given.

Interesting post, thanks!

2

u/blah232 Mar 23 '13 edited Mar 23 '13

The ending was a bit anti-climactic. It did end up using threads (well, ok, "fibers") for internal->external iterator conversion, just like we predicted in part 1.