Teaching : Python, Scheme, Java...
donnal at donnal.net
Fri Apr 18 12:58:25 CEST 2003
Steven Taschuk wrote:
> Quoth Jean-Paul Roy:
>>- Python is bad : tail recursion is not iterative (also astonished at
>>that, I can understand with an interpreter, but compiler ?)
> For teaching purposes, imho tail recursion is a Bad Thing.
> Writing an iterative process using tail recursion has always
> struck me as a clever but obfuscated technique. Write what you
> mean: if you want an iterative process, write a loop; if you want
> a recursive process, make recursive calls.
What is the difference between "recursive calls" and "tail recursion"?
Sometimes I have written methods that call the same method on a parent
or child object, with the depth of recursion being limited by a method
of the same name NOT calling itself. In the past I have thought of this
as tail recursion. Is this incorrect?
Arkansas Children's Hospital
More information about the Python-list