A new module for performing tail-call elimination

Antoon Pardon antoon.pardon at rece.vub.ac.be
Thu Jul 16 10:21:10 EDT 2015


On 07/16/2015 03:47 PM, Chris Angelico wrote:
> On Thu, Jul 16, 2015 at 11:35 PM, Antoon Pardon
> <antoon.pardon at rece.vub.ac.be> wrote:
>> Any collection of functions that tail calls each other can rather
>> trivially be turned into a state machine like the above. You can
>> just paste in the code of the individual functions and replace
>> the return call combo's with an assignment indicating which 'function'
>> is to be 'called' next and its arguments.
> That's not an algorithmic change, though. That's just a mechanical
> change, and a poorly-written one.

What did you expect when you talked about all tco examples (including
real world ones) and the reimplementation being trivial?

> My point was that I have yet to see
> anything that demands TCO and can't be algorithmically improved.

And how is this point relevant? Why should I care about what you have
not seen? Will it give me new insights about my original question in
this thread?

-- 
Antoon Pardon




More information about the Python-list mailing list