3 ms·
yeah, there is special syntax for it in other jvm languages that support tail recursion, as well (kotlin). i honestly don't know how they would do it otherwise
by holtalanm 7y ago
yeah, there is special syntax for it in other jvm languages that support tail recursion, as well (kotlin).
i honestly don't know how they would do it otherwise, really. I actually liked the `recur` syntax of clojure when i was playing around with it a few years ago, though.
- lvh 7y agoI don't see why the compiler couldn't be aware of the function it's compiling and special-cases that tail recursion; that's what every other compiler does.