develooper Front page | perl.perl6.language | Postings from July 2002

Re: Perl 6 Summary

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
July 3, 2002 17:14
Subject:
Re: Perl 6 Summary
Message ID:
a05111b0fb949437f9183@[63.120.19.221]
At 5:07 PM -0700 7/3/02, 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 it's stack.
>
>Isn't that a coroutine?


A simple form of it, yep. IIRC you can't yield out from inside a 
block, but I could be wrong there. (They do interesting things with 
Duff's Device for them)
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                       teddy bears get drunk

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About