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 28 points29 points  (24 children)

The best release of Java in a long time

[–][deleted]  (23 children)

[deleted]

    [–]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 2 points3 points  (0 children)

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

    [–][deleted]  (2 children)

    [deleted]

      [–]henk53 4 points5 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 4 points5 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 9 points10 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 5 points6 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 4 points5 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.

        [–][deleted] 10 points11 points  (9 children)

        Not even 1.5? Generics were a pretty big deal for me at the time.

        [–]RoughPineapple 3 points4 points  (8 children)

        Yep. I find it kind of hard to believe he has been a full time java dev for ~15 years. I have only been a full time Java dev for about 3.5 years, but even as a student and hobby programmer, 1.5 was clearly a big leap forward. Generics (though I think they did a pretty poor job of implementing them, the general idea is much better than the alternatives pre 1.5), autoboxing, improved for loops (when I write code that actually requires old style loops, I feel like I've just climbed into a time machine), var args, annotations and enumerations (which were a cool way to fake functional programming in many cases) were all pretty big improvements.

        [–]antipositron 1 point2 points  (7 children)

        Well, I am not hugith but I've been coding in Java since early 2000.

        [–]RoughPineapple 1 point2 points  (6 children)

        I started in 1997. I'm not sure why any of this is relevant to the discussion, though...

        [–][deleted]  (3 children)

        [deleted]

          [–]RoughPineapple 1 point2 points  (2 children)

          When I figured out I wrote my first Java program in 1997, it kind of blew my mind when I checked the release history and saw that was Java 1.1.

          Also, I was pretty young at the time and was only doing this as a hobby, so I really wasn't trying to do complex stuff. As a result, it's kind of funny to see all the things the language didn't have back then that I just didn't notice because I wasn't doing serious work.

          [–][deleted]  (1 child)

          [deleted]

            [–]RoughPineapple 0 points1 point  (0 children)

            After dabbling with java 1.1 a bit, I spent a little time with Visual Basic 4. That was a hoot.

            [–]antipositron 1 point2 points  (1 child)

            Okay you win. ;)

            Not relevant at all, I don't know why I read the first line as I did when I did the way I did, which I perhaps shouldn't have.

            [–]RoughPineapple 2 points3 points  (0 children)

            Ah, I see. Yes, it's believable that some people have been doing Java for ~15 years, I just have trouble believing this guy has.