Python 1.6 The balanced language
Aahz Maruch
aahz at panix.com
Mon Sep 4 11:51:06 EDT 2000
In article <jxA5bUAH21s5EwrP at jessikat.fsnet.co.uk>,
Robin Becker <robin at jessikat.fsnet.co.uk> wrote:
>In article <LNBBLJKPBEHFEDALKOLCMENEHDAA.tim_one at email.msn.com>, Tim
>Peters <tim_one at email.msn.com> writes
>>
>>Guido already knows how to implement generators without Stackless, and
>>indeed that's (ironically enough!) one of Stackless's problems with getting
>>into the core: the one pretty compelling use with broad appeal (iteration a
>>la CLU and Sather) can be implemented straightforwardly without Stackless.
>>Generators are also much more usable if a little syntax is added to support
>>them (like a "suspend" stmt, as in Icon too).
>
>I know the thread implementation of coroutines, but what about ease of
>use/efficiency? I see that under win32 even the improved thread
>implementation is about a 10-20% hit and with coroutines I get to a
>generator from a traversal routine very easily without any intermediate
>data structures. As for iterators the straightforward approach seems to
>escape me, but that's probably lack of imagination.
Note that Tim said nothing about coroutines or threads above. We were
talking strictly about generators, which are pretty easy to do -- we
just need to agree on an implementation and interface for integrating
them into the langauge.
--
--- Aahz (Copyright 2000 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
Goodbye dinner for Netcom shell, Thurs 9/7, 7:30pm, Mountain View, CA
e-mail me for details
More information about the Python-list
mailing list