develooper Front page | perl.perl6.internals | Postings from December 2001

Re: Generators -- Icon, Python, YAML and YATL

Thread Previous | Thread Next
From:
Dan Sugalski
Date:
December 31, 2001 06:57
Subject:
Re: Generators -- Icon, Python, YAML and YATL
Message ID:
5.1.0.14.2.20011231095138.022588e0@pop.sidhe.org
At 03:47 AM 12/31/2001 -0500, Clark C . Evans wrote:
>It seems that the Python people have figured a simple way to
>implement generators.

If you only allow yeilding from the outermost level of scope in a routine, 
you can do evil things with Duff's Device. Which is what Python does. (But 
it's sufficient for most purposes)

					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