[Python-Dev] Proper tail recursion

Michael Chermside mcherm at mcherm.com
Thu Jul 15 18:17:55 CEST 2004


Guido writes:
> Still -1.  I was understating my case: I find the "recursion is the
> basis of everything" attitude harmful.

Just for the record, I understand that is your objection, I simply
wanted to publicly disagree with it. I have a great deal of respect
for your judgement, but occasionally I think you're wrong <wink>.

Michael Walter writes:
> Anyway there was no agreement yet that Jython couldn't support that
> _feature_, too, IIRC - I would certainly be happy to have it in
> Python.

Well, I think I understand Jython well enough to provide the
assurance: Jython is (intentionally, and for good reason) designed
to utilize the JVM's call stack. Thus Jython cannot support tail
call elimination *unless* it is run on a JVM which does tail call
elimination. I don't believe any such JVM exists, but as far as I
know, the JVM specification *allows* it.

-- Michael Chermside



More information about the Python-Dev mailing list