Why is there no optimization for Java tail recursion?
Java doesn't have optimization for Java tail recursion for the same reason most imperative languages don't have it. Imperative loops are the preferred style of the language, and the programmer can replace tail recursion with imperative loops. The complexity isn't worth it for a feature whose use is discouraged as a…
Answered Oct 12, 2022 · 1.5K Views Read answer →