Syntactic Confectionery Delight | |
PerlMonks |
Re^2: No recursion depth limit?by Old_Gray_Bear (Bishop) |
on Sep 02, 2015 at 17:58 UTC ( [id://1140821]=note: print w/replies, xml ) | Need Help?? |
Recursion is a perfectly valid tool for certain types of problems, building tables of Recursive Numbers for example. (The Nth Fibonacci Number is useful in a wide variety of fields: Economics (dynamic optimization problems) and Cryptography (as a seed for pseudo-random number generators and primality testing), Genetics, the list goes on.
Recursion along with memo-ization allows clean, readable, maintainable code. Recursion has it's place in the tool-box of any professional programmer worthy of the name (and pay). The fact that you can pose a problem large enough to cause your recursion depth to go to the point that you exhaust your computer's resources is an indicator that you need a better computer. Or perhaps you are confusing recursion with 'fork-bomb'.
---- OGB
In Section
Seekers of Perl Wisdom
|
|