in reply to Re: Re^2: Iterative vs Recursive Processes
in thread Iterative vs Recursive Processes
However even so I would argue against turning it on naively.
Oh I agree. It's not something that can be globally switched on for perl 5 (and the lousy speed for subroutine calls makes tail-recursive code less appealing anyway). I just don't think caller is a problem :-)
When the things destroyed are objects that may have side-effects in their DESTROY methods (see ReleaseAction for an example where this happens) then trying to optimize tail-recursion creates a significant change in what the code does.
True, but naive scope-related DESTROY code is going to be in trouble when we get proper GC in perl6 anyway :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^4: Iterative vs Recursive Processes
by tilly (Archbishop) on May 13, 2003 at 16:26 UTC |