A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/046153.html below:

[Python-Dev] Proper tail recursion

[Python-Dev] Proper tail recursionChristopher T King squirrel at WPI.EDU
Wed Jul 14 21:13:37 CEST 2004
On Wed, 14 Jul 2004, Michael Hudson wrote:

> I guess I could have said this in c.l.py, but: what's the point?  I
> don't think I've ever had a situation where hitting the recursion
> limit wasn't a bug, and given a) the ease with which a non-contrivedly
> tail recursive algorithm can usually be rewritten iteratively and b)
> the (lack of) speed of function calls in today's Python I can't see
> any huge real advantage to this patch.

To tell the truth, I don't really have any immediate use for this
functionality, either, but since it turned out to be so easy to implement,
I ask, "why not?" ;) Presuming it doesn't break any existing
functionality, of course.* I prefer to think of it in the same light as
the opcode prediction macros, i.e. as a performance enhancement, rather
than as an attempt to introduce a new paradigm to the language (which it
isn't).

* I know it breaks stack traces, but the final implementation will only be 
used when the -O flag is specified, or some other such indicator is set.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4