[Python-ideas] A Continuations Compromise in Python

Adam Olsen rhamph at gmail.com
Sun May 3 22:54:03 CEST 2009


On Sat, May 2, 2009 at 5:55 PM, John Graham <john.a.graham at gmail.com> wrote:
> The pattern here, basically, that continue eliminates, is the constant
> referral to 'just use a trampoline function'.  To me, language
> constructs exist to codify certain patterns, similar to the way list
> comprehensions captured a lot of what was previously done in for
> loops.

No, it's not about codifying.  It's about having a *significantly
better* solution by modifying the language than working within the
language.  List comprehensions are significantly better than a full
for-loop.  Adding a keyword is not significantly better than returning
your next function; it's actually worse.

It's a non-solution to a non-problem.  If you actually *had* a problem
you could do it with trampolines.  They do exactly what's needed, they
just don't put a bow on it.  Ho hum.


-- 
Adam Olsen, aka Rhamphoryncus



More information about the Python-ideas mailing list