When there's no TCO, when to worry about blowing the stack?

Posted by Cedric Martin on Programmers See other posts from Programmers or by Cedric Martin
Published on 2013-11-07T21:08:16Z Indexed on 2013/11/07 22:18 UTC
Read the original article Hit count: 415

Every single time there's a discussion about a new programming language targetting the JVM, there are inevitably people saying things like:

"The JVM doesn't support tail-call optimization, so I predict lots of exploding stacks"

There are thousands of variations on that theme.

Now I know that some language, like Clojure for example, have a special recur construct that you can use.

What I don't understand is: how serious is the lack of tail-call optimization? When should I worry about it?

My main source of confusion probably comes from the fact that Java is one of the most succesful languages ever and quite a few of the JVM languages seems to be doing fairly well. How is that possible if the lack of TCO is really of any concern?

© Programmers or respective owner

Related posts about recursion

Related posts about stack