From: gabriele renzi Date: 2005-09-30T05:31:44+09:00 Subject: Re: Class and Iterator Design Question Eric Mahurin ha scritto: >>>I believe that's the plan. I think all the standard >> >>iterators are >> >>>going to start returning enumerator objects when called >> >>without a block. >> >>>James Edward Gray II >> >>would'nt it make more sense to have yield work coroutinish >>when called >>withouth a block, basically integrating the enumerator >>functionality in it? > > > That sounds unnecesarily complex. If it is what I think you > are talking about, you'd return some kind of object with a > continuation when you hit a yield without a block (like a > generator?). An example would help explain what you are > talking about. > > I think the current plan with Enumerators sounds better. My apologize, I actually meant "Generator" not "Enumerator". Anyway, yes, just like a Generator, and for all the usage of yield, not just for Enumerables. This, in my opinion, would be more consistent and preserve the semantic of yielding better than returning an Enumerator, but it seem this decision was already taken in the direction you like, judging from a recent patch.