Re:Tail Recursion and Debugging (2011)
by thamer on Monday September 21, 2020 @02:45PM
(#24546926)
For the JVM it's worth noting that Project Loom[1], while so far focused mainly on concurrency features like virtual threads and continuations also includes a proposal to implement better tail calls in the JVM:
> it is also the goal of this project to add an even lighter-weight construct that will allow unwinding the stack to some point and then invoke a method with given arguments (basically, a generalization of efficient tail-calls). We will call that feature unwind-and-invoke, or UAI. It is not the goal of this project to add an automatic tail-call optimization to the JVM.
Since this paragraph is explicit about the feature not being "automatic", it'll be interesting to see what form this takes.
> it is also the goal of this project to add an even lighter-weight construct that will allow unwinding the stack to some point and then invoke a method with given arguments (basically, a generalization of efficient tail-calls). We will call that feature unwind-and-invoke, or UAI. It is not the goal of this project to add an automatic tail-call optimization to the JVM.
Since this paragraph is explicit about the feature not being "automatic", it'll be interesting to see what form this takes.
[1] https://cr.openjdk.java.net/~rpressler/loom/Loom-Proposal.ht...