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/046249.html below:

[Python-Dev] Proper tail recursion

[Python-Dev] Proper tail recursionGuido van Rossum guido at python.org
Fri Jul 16 04:21:00 CEST 2004
> > > How about: Tail recursion "enables" recursion-oriented (functional)
> > > style? :)
> > 
> > Still -1.  I was understating my case: I find the "recursion is the
> > basis of everything" attitude harmful.
> 
> I think it's still best to "enable" such a style in some cases --
> Python's syntax is designed to allow formulation of a problem in the
> most natural way.  Sometimes it's more natural to formulate a
> problem as a recursive function than a procedural one, but the
> current implementation restricts this.
> 
> I agree that "recursion is the basis of everything" is harmful, but
> I think the same belief can apply to "procedularism is the basis of
> everything" (why do we have classes, list comprehensions, etc.?).
> Some things are better formulated in a procedural style, while
> others are better formulated in a recursive style.

And how should we decide whether something is better done without
recursion?  I currently have an easy answer: if it exceeds the
stack limit, you're probably spending too much time on function
calls...

--Guido van Rossum (home page: http://www.python.org/~guido/)
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