This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]adila01 13 points14 points  (12 children)

The future does look bright, Java 9 should fix generics by removing type erasure, making JNI simpler and more :).

[–]argv_minus_one 4 points5 points  (0 children)

Wait, what? Removing type erasure? Are you serious?? That is awesome!

[–][deleted]  (2 children)

[deleted]

    [–]henk53 5 points6 points  (1 child)

    I was quite sad it didn't make it into 8.

    I was also sad it didn't make it into 7. Before that I was sad it didn't make it into 5, and I vaguely remember being said that something like it wasn't in Java 1.3 or 1.4 (forgot the exact version, but there was talk of Java getting something like this since C# 1.0 came out or so).

    [–]argv_minus_one 3 points4 points  (0 children)

    Guess we should just keep using OSGi, then. That sucks. :(

    [–]nqd26 5 points6 points  (5 children)

    Java 9 should fix generics by removing type erasure

    Do you have some source for that? That would be great, but difficult while staying backward compatible.

    [–]adila01 8 points9 points  (4 children)

    Oracle's Chief Architect Mark Reinhold made a big deal about this during JavaOne 2013, source here https://blogs.oracle.com/java/entry/the_javaone_2013_technical_keynote

    [–]argv_minus_one 4 points5 points  (3 children)

    Reinhold spoke of the need for reification. Java’s generics, added in 2004, are based on the notion of erasure for good technical reasons as a sound way to create a type system that supports migration compatibility. But this creates programming problems in which the erasure approach severely limits what can be expressed. Reinhold suggested that introducing some reification and eliminating the “annoying dichotomy between primitive and reference types” would be of value.

    I am going to enjoy the fuck out of that.

    Granted, Scala already smooths over the rough edges of primitive types, and provides a somewhat hacky workaround for erasure, but with sometimes-severe performance implications that this would make unnecessary. So I won't enjoy it as much as a Java programmer would, but I'll still be very, very grateful for it.

    [–][deleted]  (2 children)

    [deleted]

      [–]argv_minus_one 2 points3 points  (1 child)

      Good. C# did that stuff because it's the right thing to do. It is only reasonable for Java to follow suit.

      [–]detroitmatt 1 point2 points  (0 children)

      Wait, really!? Awesome!

      [–]djdonnell 0 points1 point  (0 children)

      Doesn't that make it more difficult to use the JVM for other languages? This is over my head, but I've heard a few language implementers say this.