Re: Class and Iterator Design Question
- From: gabriele renzi <surrender_it@xxxxxxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 20:27:32 GMT
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.
.
- Follow-Ups:
- Re: Class and Iterator Design Question
- From: Eric Mahurin
- Re: Class and Iterator Design Question
- References:
- Re: Class and Iterator Design Question
- From: gabriele renzi
- Re: Class and Iterator Design Question
- Prev by Date: Re: In your opinion....
- Next by Date: Re: Gems undermine unit testing
- Previous by thread: Re: Class and Iterator Design Question
- Next by thread: Re: Class and Iterator Design Question
- Index(es):
Relevant Pages
|
Loading