Hacker News new | ask | show | jobs
by spullara 3535 days ago
The next interesting thing for the JVM is value types in Java 10. It may convince me to use it pre release.
3 comments

There are Valhalla releases available, but I bet stable is something they are not.
I'd also add:

  Generic Specialization  
  Reified Generics  
  Native Function Calling
  Native Data Access
  New Data Layouts
>Reified Generics

This will not happen.

Probably not at the language level. If you watch the Goetz talk you linked to he answers this at 50m36s. The bytecode and JVM will be able to represent riefied generics, but at the Java language level they'll still likely maintain erasure for Object types.

https://www.youtube.com/watch?v=Tc9vs_HFHVo&list=PLX8CzqL3Ar...

I know, but with the JVM having full support, that might eventually change in Java 11 lets say, after the experience how everything went.

Brian did not state they will never do it.

Also the other languages could take advantage of it anyway, even a reiffied version of Java for example.

Reified generics for reference types is a really, really bad idea. It solves a minor, itsy-bitsy-tiny problem, but pretty much ruins sharing of data structure among languages, because it bakes a specific variance model into the classes. For value types that's not a problem because they don't support subclassing anyway.
Good thing Kotlin already supports reified generics (with the current caveat that they must be used in inline functions), Java the language is less important these days than the JVM having support for the feature.
Java the language is still very important, it is the systems programming language of the JVM.

On my .NET projects we get a full installation from Visual Studio on the development machines. Which means C#, F#, C++ and VB.NET available.

On my Java projects those machines have usually Eclipse + JDK. JARs are either vendored or make use of an internal Maven server.

I am yet to be allowed to use anything other than Java (the language) on those kind of projects.

Most customers want replaceable consultants so they don't allow us to go outside of their standard stack.

Those are not fully reified generics, only the native types generics are reified.
>This will not happen.

This will happen.

Yeah. Unfortunately, unsafe is removed in JDK 9. :(

Edit: It seems removing unsafe is just a rumor.

there were talks about removing it, but it's going to be available: http://openjdk.java.net/jeps/260
BS
No seriously Unsafe is not removed, it's not even deprecated because there is no replacement. I don't know where people get this idea from. Did anybody check the source? Of course not. Just repeating something somebody wrote on the internet somewhere.

Unsafe is going to stay

https://www.youtube.com/watch?v=4HG0YQVy8UM&t=1s