Hacker News new | past | comments | ask | show | jobs | submit login

JavaScriptCore keeps track of frames, even for JavaScript proper tail calls: https://webkit.org/blog/6240/ecmascript-6-proper-tail-calls-...



The essential words in that article are...

> 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.


What would Java's be? Is there an interface besides Thread.getStackTrace()?


It’s also the format of the backtrack - I think that’s covered by the TCK.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: