in reply to understand and prevent 'Out of memory!' during sub recursion
This is why I almost never use "terse" code like this – like map. You can't instantly tell what the code is doing, and you really don't have any way to break-out. (That's not what map is intended for.) The snake eats its own tail until it grows too fat and dies. Whereas, a very short subroutine would accomplish the same task and do so with clarity. There would be no meaningful difference in execution time. Terseness is really not your friend at all. Clarity, and maintainability, is.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: understand and prevent 'Out of memory!' during sub recursion
by Eily (Monsignor) on Nov 09, 2017 at 16:28 UTC | |
Re^2: understand and prevent 'Out of memory!' during sub recursion
by hippo (Bishop) on Nov 09, 2017 at 16:46 UTC |
In Section
Seekers of Perl Wisdom