4 ms·
C++ and the dotNet CLR (so C# etc) support tail recursion elimination. That's a big percentage of widely used languages.
by phonebanshee 7y ago
C++ and the dotNet CLR (so C# etc) support tail recursion elimination. That's a big percentage of widely used languages.
- incompatible 7y agoI didn't know about C++ (and not familiar with dotNet). I suppose it's not in the C++ standard, but apparently some compilers do it, perhaps as a side-effect of optimisation. So it may work in some cases, when using certain compilers, and not others. https://stackoverflow.com/questions/34125/which-if-any-c-compilers-do-tail-recursion-optimization https://stackoverflow.com/questions/34125/which-if-any-c-com...