开发者

Does Java support tail recursion? [duplicate]

开发者 https://www.devze.com 2023-01-29 23:39 出处:网络
This question already has answers here: Closed 12 years ago. Possible D开发者_如何学Gouplicate: Why does the JVM still not support tail-call optimization?
This question already has answers here: Closed 12 years ago.

Possible D开发者_如何学Gouplicate:

Why does the JVM still not support tail-call optimization?

I see so many different answers online, so I thought I'd ask the experts.


There is difference between tail recursion and tail recursion optimization. Tail recursion is supported by java because there is nothing special in it, tail recursion optimization is not supported.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号