Does the JVM prevent tail call optimizations?
This post: Recursion or Iteration? might help. In short, tail call optimization is hard to do in the JVM because of the security model and the need to always have a stack trace available. These requirements could in theory be supported, but it would probably require a new bytecode (see John Rose’s informal proposal). There … Read more