[Python-ideas] A Continuations Compromise in Python
Aahz
aahz at pythoncraft.com
Tue May 5 03:48:26 CEST 2009
On Mon, May 04, 2009, John Graham wrote:
>
> I do have a question though, if recursive algorithms are generally
> frowned upon (and I'd say, without TCO, anything too complex hits the
> stack quick) why is recursion even supported? What is the 'Pythonic'
> use of recursion?
Who has said that recursive algorithms are "generally" frowned upon?
What people have said is that Python is not focused on recursive
algorithms the way TCO-languages are, but that is also true of e.g.
functional programming style. Recursive algorithms are natural for
nested datastructures, but you will almost never find a nested
datastructure that is a thousand levels deep.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"It is easier to optimize correct code than to correct optimized code."
--Bill Harlan
More information about the Python-ideas
mailing list