2 ms·
Scala supports simple recursive tail-call optimization, but is less elegant in handling mutual recursion (due to JVM constraints). Clojure is probably the one
by chc 13y ago
Scala supports simple recursive tail-call optimization, but is less elegant in handling mutual recursion (due to JVM constraints).
Clojure is probably the one you're thinking of that doesn't support tail-call elimination at all. Rich Hickey thought that if you couldn't do it cleanly in all cases (like mutual recursion), you may as well just come up with something else. So instead of optimizing recursive calls, Clojure has the recur function.