JDK 28

(openjdk.org)

42 points | by ejboy 3 hours ago ago

18 comments

  • jmarlow47 35 minutes ago

    It's really refreshing to see the pace of Java development pick up so much over the past few years.

    The last few years of server-side has been on Kotlin for me, however, modern Java is looking more and more like anything I'd need in a language.

    • MBCook 8 minutes ago

      I’m so glad they made that change. So much better than the old days.

      I love Java and I’m so glad it’s kept improving so much despite all the turmoil in its ownership.

    • brianwawok 23 minutes ago

      Yah but why? The things it was good at doesn’t really matter nearly as much post AI.

      • pron 17 minutes ago

        Quite the opposite. Java is almost all about an optimising runtime with deep telemetry, and it helps with exactly the things AI needs the most help: https://youtu.be/fXBGBovpH88

      • jjav 12 minutes ago

        > Yah but why? The things it was good at doesn’t really matter nearly as much post AI.

        Pretty much the opposite. Those who disliked it usually cited having to type too much due to class verbosity and variable verbosity (the former has merit, the latter was purely a choice).

        If you no longer need to type in any of the code, what better than a language with a blazing fast and scalable runtime, with excellent debugging and monitoring support.

  • amelius 2 hours ago

    I'm not a Java person, but I'm curious how fast it is nowadays, and also the startup time. Can it be used to write shell commands with, for example?

    • azatom 36 minutes ago

      Sorry if it is trivial but bc you asked shell command and if meant the "java script.java" no compile way: even that is fast, but if you run in a shell script loop thousand times, then do not forget to compile.

    • ww520 an hour ago

      I'm using JDK 21 (old) and the startup time is sub-second for small programs.

      • Havoc 44 minutes ago

        That’s not the flex you seem to think

        • ww520 42 minutes ago

          It wasn't meant to be a flex.

    • binary132 39 minutes ago

      JIT + hotspot optimization makes JVM pretty fast, but warmup time is usually the problem. However it does look like they’re addressing startup time with improvements in this release:

      - AOT compilation: https://openjdk.org/jeps/544 - ~100ms startup for ZGC: https://openjdk.org/jeps/545

    • jiggawatts an hour ago

      Every time I try, I keep going back to .NET, which has been optimising for faster startup time.

      Almost all Java benchmarks are for the "steady state" after half an hour of warm up time.

      • kg an hour ago

        Doesn't Java have an AOT solution too? Is it not ready for prime time?

        • miroljub an hour ago

          It is, but people like to bash Java ;)

    • __natty__ an hour ago

      Very fast. And yes, it can be used for small apps too. With java problem now is not the performance but how verbose still it is. However, it's much better since Java 17 and each release make it even more compact and direct. Like in this release we got much better built-in support for JSON.

  • MrBuddyCasino an hour ago

    JEP 540: Simple JSON API

      > trailing commas and comments are not supported
    
    Be strict in what you produce, be lenient in what you accept. Grr.
    • chowells 17 minutes ago

      Fortunately, we now have 50 years of evidence of the negative effects of this philosophy on the ecosystem. Being strict in both results in net positive effects for the entire ecosystem. Trying to be lenient in what you accept results in HTML5, where the exact parse tree for every possible input sequence is specified in order to enforce compatibility. It's no longer lenient, because that doesn't work.

    • mpyne 17 minutes ago

      From the JEP's goals: "Provide only those data types and operations required for strict conformance to RFC 8259, in order to facilitate machine-to-machine communication."

      In that case they made the right choice, as machines won't be inserting trailing commas or comments in the first place, and the risk of having consuming apps inadvertently accept invalid data would be high otherwise.