[Python-ideas] A Continuations Compromise in Python
Steven D'Aprano
steve at pearwood.info
Sun May 3 18:06:26 CEST 2009
On Mon, 4 May 2009 02:00:25 am John Graham wrote:
> I want to clarify that the original suggestion was never to implement
> TCO 'implicitly'. I don't want to have to 'write my function just
> right' to get TCO to work. This is why the keyword was suggested, as
> it'd be an explicit way to tell the interpreter 'this is a
> tail-call'. If it's not, then throw an exception. Otherwise, there's
> no optimizations going on behind the scenes that I'm not aware of,
> which is the case in languages that just turn tail calls optimized
> behind the scenes.
Hmmm... that puts a whole new light on your proposal, at least in my
mind. I'm still dubious about using the keyword continue, but less so
than before. Let me think about it.
--
Steven D'Aprano
More information about the Python-ideas
mailing list