Software bugs aren't inevitable
Terry Reedy
tjreedy at udel.edu
Thu Sep 15 16:56:06 EDT 2005
"Steven D'Aprano" <steve at REMOVETHIScyber.com.au> wrote in message
news:pan.2005.09.15.11.56.05.778026 at REMOVETHIScyber.com.au...
> Are you saying that the recursion done by "serious" languages is a fake?
> That it is actually implemented behind the scenes by iteration?
Although easy to confuse, we should separate expressive syntax, whether
recursive or iterative, from computation implementation. (The expressive
question would remain even if computation were replaced by a magic
answer-oracle.) What you call iterative implementation can also be called
within-frame recursion. The function parameters are bound to new values or
objects and control jumps to the first line of code. The only thing 'fake'
about this as a function call is the reuse of the same execution frame
instead of allocation a new frame when a new frame is not needed.
Terry J. Reedy
More information about the Python-list
mailing list