Peter Scott wrote:

> At 01:54 PM 7/3/02 -0600, Thom Boyer wrote:
>
>> I'm personally MUCH more interested in Python's generators
>> <http://www.python.org/peps/pep-0255.html>.
>>
>> A generator is like an iterator in that it can produce
>> a series of values. But unlike iterators, when you ask
>> a generator for the next value, it picks up execution
>> exactly where it left off when it returned the last
>> value -- including all [its] stack.
>
>
> Isn't that a coroutine?  I thought they were already slated for P6.  
> *Rummage*  Yes:
>
> http://www.yetanother.org/damian/diary_April_2001.html
> Or if you like:
> http://www.yetanother.org/damian/Perl5+i/coroutines.html
> -- 
> Peter Scott
> Pacific Systems Design Technologies

Yes, coroutines are more than enough to implement generators (as Dan 
Sugalski has already agreed).

And thanks for the pointers. I've been out of touch with the Perl 
community the last couple of years. It's been exciting seeing how Perl 6 
is shaping up, but I'm having a hard time making up lost time. The 
postings to perl6-language often take for granted features of Perl 6 
which I haven't been able to find in any of the apocalypses or exegeses, 
so I've been plowing through the archive trying to get more background 
-- but I hadn't yet made it back to April 2001!

Knowing that coroutines are already under discussion WRT Perl, I was 
able to google the existence of RFC 31 and other references to 
coroutines in Damian's corpus. (Including a slide show from August 2001 
titled "Perl 6 Prospectus", where it is in the "What we might see" 
section.) I've been unable to determine whether coroutines are really 
"slated for P6," as you suggest. Has there been any indication whether 
those suggestions have met with Larry's approval?

=thom



Reply via email to