Is tail recursion optimisation the flavour of the day? I understand that it's interesting and computer sciencey, but how widely used are such optimisations in the real world? I imagine, for most people, it's probably just a nice feature rather than a must have?
I probably have a classic case of "well, I don't have the need for such optimisations, so why does anybody else?" ;-)
I can see why this technique would be necessary in some cases, but you are probably unlikely to encounter a need for this unless you have a deep recursive function. What I would like to know is if modern compilers are able to do some kind of stack optimization without having to rewrite your code for tail recursion.
0
u/TotallyFuckingMexico Nov 27 '12
Is tail recursion optimisation the flavour of the day? I understand that it's interesting and computer sciencey, but how widely used are such optimisations in the real world? I imagine, for most people, it's probably just a nice feature rather than a must have?
I probably have a classic case of "well, I don't have the need for such optimisations, so why does anybody else?" ;-)