Tail recursion to while iteration in 2 easy steps

Antoon Pardon antoon.pardon at rece.vub.ac.be
Mon Oct 7 13:57:36 EDT 2013


Op 07-10-13 19:15, Alain Ketterlin schreef:
>> I want to consider here what it would mean to concretely implement the
>> abstract notion 'disallow rebinding of function names' and show what
>> would be behind calling the idea 'not feasible'.
>
> Again, I'm more concerned about the function than about the name.
>
> And the fact that "disallow rebinding of function names" is not feasible
> in Python is a design choice, not an essential characteristic of every
> programming language.
>
> That's fine. My point was: you can't at the same time have full
> dynamicity *and* procedural optimizations (like tail call opt).
> Everybody should be clear about the trade-off.

Your wrong. Full dynamics is not in contradiction with tail call
optimisation. Scheme has already done it for years. You can rebind
names to other functions in scheme and scheme still has working
tail call optimisatiosn.

-- 
Antoon Pardon




More information about the Python-list mailing list