Software bugs aren't inevitable
Paul Rubin
http
Wed Sep 14 15:23:00 EDT 2005
Steven D'Aprano <steve at REMOVETHIScyber.com.au> writes:
> It is a "mere implementation detail" that (for most computer systems, and
> most programming languages) stack space is at a premium and a deeply
> recursive function can run out of stack space while the heap still has
> lots of free memory.
Every serious FP language implementation optimizes tail calls and thus
using recursion instead of iteration doesn't cost any stack space and
it probably generates the exact same machine code.
More information about the Python-list
mailing list