English Idiom in Unix: Directory Recursively

Thomas A. Russ tar at sevak.isi.edu
Wed May 18 02:42:20 EDT 2011


"Pascal J. Bourguignon" <pjb at informatimago.com> writes:

> Roland Hutchinson <my.spamtrap at verizon.net> writes:

> > Tail recursion  can always be turned into an iteration when it is
> > executed.  
> 
> All recursions can be turned into iterations, before execution.

True, but only by simulating the call stack in the iterative code.  To
my mind that isn't really an iterative algorithm anymore if it ends up
simulating the call stack.

Tree walks are the canonical example of what can't be done in an
iterative fashion without the addition of an explicitly managed stack



-- 
Thomas A. Russ,  USC/Information Sciences Institute



More information about the Python-list mailing list