[Stackless] Link to Stackless.py with select

Andrew Francis andrewfr_ice at yahoo.com
Fri Jun 11 01:17:42 CEST 2010

Hi Richard:

> Message: 4
> Date: Fri, 11 Jun 2010 07:59:32 +1200
> From: Richard Tew <richard.m.tew at gmail.com>
> To: Andrew Francis <andrewfr_ice at yahoo.com>
> Cc: stackless at stackless.com
> Subject: Re: [Stackless] Link to Stackless.py with select
> Message-ID:
>     <AANLkTin4DekBT1mnQJNuVwCCeINltzRCAF3aVcwgS5gX at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1

On Fri, Jun 11, 2010 at 1:21 AM, Andrew Francis <andrewfr_ice at yahoo.com> wrote:

AF> I feel that even with ifs/hash tables, code using a select() has AF>better structure and gives more flexibility than its Go equivalent.

RT>How so?

Maybe I went a little over board on the better structure.... However 
with an if statement one can do stuff like

if ch in []:
elif ...

a Go commCase is much simpler. And I believe stuff like case fallthoughs
are gone. Given how case works in a Select, I don't see a great advantage
over if/elif/else statements. 

Also, the number of cases in a select() are fixed. If we use a list 
we have more flexibility

if ch:

# inside a function
dispatch[newCh] = doStuff
Although I think a Stackless Python select() would be used, I don't
really see the need for it to be a language feature like Go. I envision
myself using select() in a much more dynamic environment than maybe
envisioned by Go.

>Just to be clear, I mean in terms of adding custom syntax rather than
>using some goto mechanism.  However, I do not drink the "goto
>considered harmful" kool-aid and say yes "gotos" in any case :-)

Fair enough. Since Python doesn't have a goto, goto isn't on my
mind often :-) However I am not clear on custom syntax. Do you mean
get out PyPy and design a new language feature?



More information about the Stackless mailing list