[rust-dev] Iterators in Rust

2013-02-04 Thread Vadim
Hi, I saw a posthttp://www.reddit.com/r/programming/comments/17hqg4/a_little_bit_rusty_practical_approach_on_rust/c86xyorby Patrick Walton last week on Reddit in which he implied that it is possible to convert Rust enumerator function into a Java-style iterator by applying some magic transformer

Re: [rust-dev] Iterators in Rust

2013-02-04 Thread Patrick Walton
On 2/4/13 11:34 AM, Vadim wrote: Hi, I saw a post http://www.reddit.com/r/programming/comments/17hqg4/a_little_bit_rusty_practical_approach_on_rust/c86xyor by Patrick Walton last week on Reddit in which he implied that it is possible to convert Rust enumerator function into a Java-style iterator

Re: [rust-dev] Iterators in Rust

2013-02-04 Thread Vadim
So right now there is no way to implement, say, lock-step iteration of two containers, without first copying contents of one of them into a vector? On Mon, Feb 4, 2013 at 12:15 PM, Patrick Walton pwal...@mozilla.com wrote: On 2/4/13 11:34 AM, Vadim wrote: Hi, I saw a post

Re: [rust-dev] Iterators in Rust

2013-02-04 Thread Patrick Walton
On 2/4/13 12:57 PM, Vadim wrote: So right now there is no way to implement, say, lock-step iteration of two containers, without first copying contents of one of them into a vector? Not using the normal iteration protocol. Some containers (for example, treemap, IIRC) have methods that will