3 ms·
> Other future changes I am excited for, but don't expect to get implemented any time soon, if ever, frankly, are: Most if not all of them will land in the nex
by pron 7y ago
> Other future changes I am excited for, but don't expect to get implemented any time soon, if ever, frankly, are:
Most if not all of them will land in the next few years. In fact, working on those precise features is what most of the OpenJDK team does.
> Improved native code interop. I consider this to be both a language and VM change.
That would be Project Panama, making its initial, partial delivery in JDK 14 (GA next March, EA available now).
> Improved memory layout control, including stack-allocated types and inlined objects inside of other objects.
Project Valhalla. The most complicated of the bunch. Just had a recent major breakthrough, and you can work with the EA release already.
> project loom for golang-style I/O programming.
Working on it :)
> full tail recursion. Why was this feature rejected from the VM?
Not at all rejected. It's still a goal for Loom. We'll just do lightweight concurrency first. Cost/benefit prioritization etc.
- tempguy9999 7y agoUtterly dumb question but why is tail recursion necessary in the JVM given that the compiler is better placed simply to turn recursion into a loop. TR removal should be done best at the highest level I'd think.
- pron 7y agoThe compiler can only make this transformation in special cases, in particular, when it doesn't break any of the JVM's semantics (also, not all recursion is self-recursion, i.e. a tail call to the subroutine you're in). You can't just discard a frame of a call in a tail position, because some security mechanisms require knowing the full call-stack (plus, developers might hate you when their stack traces start missing crucial frames). So we're talking about explicit tail calls, in places that can be checked for the safety of the optimization.
- chrisseaton 7y ago> the compiler is better placed simply to turn recursion into a loop How do you think it should do this? While keeping the semantics of Java.