pinard at iro.umontreal.ca
Tue Feb 22 20:59:10 CET 2000
bjorn <bjorn at roguewave.com> écrit:
> Moshe Zadka wrote:
> > On 22 Feb 2000, [ISO-8859-1] François Pinard wrote:
> > > What would be the advantages of using a "functional" Python, as per
> > > your definition? I mean, of course, in practice?
> > None. But it would be cool to have tail recursion [...]
Hmph! This is not a good enough reason. One coolness of Python is that
it does not implement "cool" things of doubtful use.
> [...] what is stopping us from implementing tail call optimization (of
> which tail recursion is just a special case) with the current Python
Optimising tail call recursion usually means turning it into an iteration.
In many cases, it would just as simple and clear to write iteratively.
Yet, there might be a few cases when tail recursion would yield more legible
writing. As long as legibility is the main goal, it could be a good idea.
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list