[Python-ideas] A Continuations Compromise in Python
Adam Olsen
rhamph at gmail.com
Tue May 5 12:21:05 CEST 2009
On Mon, May 4, 2009 at 6:26 PM, John Graham <john.a.graham at gmail.com> wrote:
> As I recall, a few people have advocated a TCO decorator, which I
> imagine would look a lot like your trampoline decorator, and it
> usually falls apart in corner cases. I don't have any examples with
> me though. I do have a question though, if recursive algorithms are
> generally frowned upon (and I'd say, without TCO, anything too complex
> hits the stack quick) why is recursion even supported? What is the
> 'Pythonic' use of recursion?
There's many forms of recursion that do not involve unbounded
recursion. Consider a call to len() that calls len() on another
object.
--
Adam Olsen, aka Rhamphoryncus
More information about the Python-ideas
mailing list