On Fri, Sep 25, 2009 at 9:46 PM, Tomas Matousek
<Tomas.Matousek / microsoft.com> wrote:
> I meant that "yield next" would only transform the method (or block) that lexically encloses it. Like in Python. If we wanted to propagate the state transformation across methods we could also introduce "yield foreach" construct [1].
>
> [1] http://citeseer.ist.psu.edu/cache/papers/cs2/355/http:zSzzSzwww.cs.kuleuven.ac.bezSz~frankzSzPAPERSzSzFTfJP2005.pdf/iterators-revisited-proof-rules.pdf

This is definitely an option but it requires us to either transform
all methods that have such a yield (perhaps not a big deal; Jython
does this) or be able to inspect the target method to see if it could
be lazily transformed.

I'm leaning more and more toward the opinion that MRI-style
Enumerator#next is not going to be supportable on many other
implementations, and the explicit iteration protocol is the way to go.

- Charlie