> I'm assuming that the issue is that alias analysis will prevent you from > returning a reference due to it not being able to see through the closure?
I guess we could use return-by-alias here, yes. I was kind of assuming everybody hated that and wanted it to go away. But if we use that we can no longer return a tag to indicate end of sequence (you can't currently wrap a reference in a data structure -- supporting that would get way too hairy). > This is the kind of complexity that I was hoping to avoid. I would prefer to > do some sort of stack-jumping protocol (i.e. just jump back to the previous > frame on a |put|) before this. The problem I was trying to avoid (which your approach would also solve) is that our current iterators do not support iterating over multiple things at once. This is very awkward (see all the while loops we're still using). Having first-class iterators would make it possible to use them in more than simple, single-sequence loops. _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
