do...until wisdom needed...

Alex Martelli aleaxit at yahoo.com
Fri Apr 20 10:19:39 EDT 2001


"Neelakantan Krishnaswami" <neelk at alum.mit.edu> wrote in message
news:slrn9dv5st.68t.neelk at alum.mit.edu...
    [snip]
> My personal suspicion (and this is just a guess) is that if
> syntactically lightweight generators and coroutines were added to
> Python, then the pressure for new features would fade.

Why would generators and coroutines (wonderful things to have,
to be sure!) kill the masses' craving for always more, always
different syntax sugar?

You're right that some languages seem to have escaped from
such pressure, and macros in particular, but is laziness the
cause, or just happenstance?  (Do Delphi, Java, Visual Basic
have macros?  I don't think they do).

> so much of it. (They will kill all desire for new loop syntax dead,
> for example.)

Wanna bet?  Maybe I'm misunderstanding the "syntactically
lightweight" solution you have in mind, but if coroutine
calls look somethink like function calls, for example, how
would they sate the craving of somebody who thinks, e.g.:

    while 1:
        fee()
        fum += 23
        fie()
        if foo(): break

is trash and a language worth mentioning MUST be able to
spell this identical semantics as:

    do:
        fee()
        fum += 23
        fie()
    until foo()

[or whatever]?


And about "pressure for new features" more generally, how would
coroutines sate the craving of some for declaration of
variables, 'self' being implicit in methods, braces in
stead of indentation, and so on, and so forth?


> All in all, I'd suggest coroutine syntax as the "last feature" for
> Python rather than hygienic macros.

I would find some good syntax for coroutines very
interesting indeed, but I suspect you may be far
too optimistic about the chances that it could
extinguish featuritis...:-)


Alex






More information about the Python-list mailing list