Announcement

Collapse
No announcement yet.

Java 11 Released As The First Java LTS Release

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Java 11 Released As The First Java LTS Release

    Phoronix: Java 11 Released As The First Java LTS Release

    Java 11 (JDK 11) is officially out today as the first Java Long-Term Support (LTS) release under Oracle's new six month release strategy...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2


    Congratz, you took 7 more years than C++ to implement a basic feature that C++ missed for decades itself.

    Comment


    • #3
      ChaChao?

      Comment


      • #4
        Originally posted by AsuMagic View Post
        http://openjdk.java.net/jeps/323
        Congratz, you took 7 more years than C++ to implement a basic feature that C++ missed for decades itself.
        AsuMagic: Question - Which features are you talking about?

        Comment


        • #5
          Originally posted by Sethox View Post

          AsuMagic: Question - Which features are you talking about?
          He's talking about Type inferencing. In Java with "var", in C++ with "auto".
          The Java language devs are having a hard time implementing stuff where C# implemented it first, even though some of the ideas are great and C# is not even the only language to have them. Like type inferencing.
          On top of that, they even implemented the inferior sort of system, without "val" for constants, like Kotlin got it.
          The difference is quite profound psychologically, as "val" encourages you to write more efficient code that also states intent better.

          It's more efficient, because the compiler can optimize code using constants to a higher level than code with variables, and it states intent better, because val constants are immutable. Writing "final var" is not the same thing psychologically, you sometimes just miss it or you're too lazy because of the boilerplate / extra keyword.

          Comment


          • #6
            Originally posted by AsuMagic View Post
            http://openjdk.java.net/jeps/323

            Congratz, you took 7 more years than C++ to implement a basic feature that C++ missed for decades itself.
            I think the feature is not new in Java 11. They just changed the syntax.

            Comment


            • #7
              Originally posted by caligula View Post

              I think the feature is not new in Java 11. They just changed the syntax.
              Type inference got added in Java 10 (so just 6 months ago). But it wasn't there for lambda variables, now it's available there too.

              Comment


              • #8
                Originally posted by Degra View Post

                Type inference got added in Java 10 (so just 6 months ago). But it wasn't there for lambda variables, now it's available there too.
                No, type inferencing in lambdas has been there since lambdas are in Java (which is Java 8).

                That "feature" there is just so we can be consistent between local variables and lambda parameters.

                That's completely useless IMHO. I won't add "var" to a lambda just because I use to add "var" to local variables.

                That's one of the things I just skimmed past when reading the new specifications. That's totally cosmetic, and I don't even see how that's aimed at achieving a higher level of consistency.

                foo.bar((a, b) -> a.fooBar(b));

                and

                foo.bar((var a, var b) -> a.fooBar(b));

                Are exactly the same thing, AFAIK.

                ​​​​

                Comment


                • #9
                  Originally posted by Degra View Post

                  Type inference got added in Java 10 (so just 6 months ago). But it wasn't there for lambda variables, now it's available there too.
                  Also it's not like they didn't know about these features. The actual developers are not very bright and hate breaking changes.

                  Comment


                  • #10
                    I'd be interested to see how this changes over time now that Java 11 is out.

                    https://en.wikipedia.org/wiki/Compar...Sharp_and_Java

                    Comment

                    Working...
                    X