Walter: any plan to add support for yield/return Iterators/generators?

Walter Bright newshound at
Tue Sep 5 12:43:49 PDT 2006

Bruno Medeiros wrote:
> Marcio wrote:
>> Walter Bright wrote:
>>> I've thought of doing generators, but they're a 2.0 or later feature. 
>>> They're a lot of work to implement.
>> I am curious... Do you have references to papers on the implementation 
>> tricks needed?
>> I believe they were first implemented in Barbara Liskov's CLU? 
>> marcio
> One of the things needed for sure is heap frames.

That's right, instead of using the stack for the locals, the heap is 
used. It isn't that much different from using a functor. In fact, now 
that I think about it, a functor might be a better way to do it than yield.

More information about the Digitalmars-d mailing list