Re:Show HN: Tail Recursion Optimization for the JVM
by saagarjha on Wednesday April 22, 2020 @11:37PM
(#22952589)
What would Java's be? Is there an interface besides Thread.getStackTrace()?
Re:Show HN: Tail Recursion Optimization for the JVM
by chrisseaton on Thursday April 23, 2020 @05:04AM
(#22954088)
It’s also the format of the backtrack - I think that’s covered by the TCK.
> There are some non-standard ECMAScript features in JavaScript that work differently in the presence of PTC.
Java has a strict spec, and the relevant methods which would break aren’t non-standard like they are in JavaScript.
If you’re willing to change the spec (I think Loom does) then yeah, but you can’t implement it as an ‘optimisation’ until then, because it’s not an optimisation if it changes behaviour.