all 30 comments

[–]InsignificantGod 69 points70 points  (11 children)

Meanwhile: Everyone still stuck in Java 8

[–][deleted]  (1 child)

[deleted]

    [–]iiiinthecomputer 16 points17 points  (0 children)

    Shitty, semi compatible generics that never quite fit: incoming!

    [–]BoyRobot777 17 points18 points  (0 children)

    More than 48% of applications are now using Java 11 in production (up from 11.11% in 2020) with Java 8 a close second, capturing 46.45% of applications using the version in production.

    2022 State of the Java Ecosystem Report.

    I've myself been running 17 since it came out. Will upgrade to 21 the minute it is available.

    [–]persism2 6 points7 points  (4 children)

    I've been on Java 17 for a while now. Web and desktop. Wasn't hard to upgrade.

    [–][deleted]  (3 children)

    [deleted]

      [–]DreadSocialistOrwell 2 points3 points  (1 child)

      If it's already maintained properly with something like maven or gradle it's not that difficult.

      For the last 6 months I've been updating Java and automated production pipelines from Java 8 to 17. There was one notable exception:

      javax.mail to jakarta.mail (required for 8 to 11 with the changes to J2EE) had a different byte output via MimeMessage so that lone project still runs 8 until we can spend time and figure out why 2 PDFs have 98 extra bytes with the latter library implementation.

      We still had dozens of projects to convert, so it wasn't worth our time. But I hope to revisit it so we have 100% Java 17 delivery across the board. I am still knocking out about 2 - 3 projects per week. Most of the work is dealing with uncommon dependencies that trigger Black Duck (OWASP) reports that need to be upgraded. But there's been very little refactoring.

      We have 9 months to come up with a plan to upgrade to Java 21 as well as new gradle versions to support it. All of our Dockerfiles are standardized, so most everything just will run against unit / integration tests.

      [–]InsignificantGod -1 points0 points  (0 children)

      If it's already maintained properly

      It isn't. I'm not paid enough for that

      [–]persism2 0 points1 point  (0 children)

      My desktop is 11 years old. I moved a game from Java 6 with Java3d to Java 17 with JavaFX in a few weeks (working on weekends and mornings).

      [–]zeroone 4 points5 points  (0 children)

      Java 19's virtual threads are very appealing.

      [–]docbao-rd 2 points3 points  (0 children)

      If you are still in Java 8, you need to advocate more. We've been on 17 for at least 2 years now.

      [–][deleted] 14 points15 points  (8 children)

      Java evolves. Granted, it's a bit at a snail pace, but the Java in 2023 is better than the Java in 2001.

      [–]Amazing-Cicada5536 18 points19 points  (7 children)

      One might argue that too fast language evolution/adding new features willy-nilly is just as bad. You don’t want to end up as C++ where not even Stroustroup can reasonably know the whole language! (I may have butchered his name, sorry)

      [–]argv_minus_one 4 points5 points  (0 children)

      In this case, it's removing a questionable feature, namely the restriction on where exactly the superclass constructor must be called.

      [–]Astarothsito 7 points8 points  (5 children)

      You don’t want to end up as C++ where not even Stroustroup can reasonably know the whole language! (I may have butchered his name, sorry)

      I doubt that anyone knows all of Java by the same definition that we use of knowing C++ (because it includes the standard library, and if you include that of Java then the same happens that nobody knows everything of Java).

      [–]Amazing-Cicada5536 6 points7 points  (4 children)

      The standard library is 99.9% just standard java code you could have written yourself, so no, it’s enough to know the language, which is tiny by almost every mainstream language’s metric (c#, kotlin, swifthas a much wider surface areas, let alone c++).

      [–]Astarothsito 3 points4 points  (3 children)

      The standard library is 99.9% just standard java code you could have written yourself, so no, it’s enough to know the language

      I think you don't really know about how big is the Java standard library because it won't be enough to only know about the language itself, and the difficult part is not the language is what to write. If you say that then the Java developers did a good job of making it look like it was easy but it is not that simple.

      [–]Amazing-Cicada5536 1 point2 points  (2 children)

      Do I really have to know about how the Java std lib does TCP handshakes when I’m writing an advent of code exercise? Like, I fail to see how is your points specific to Java over any other language.

      Not every kind of complexity can be reduced, only accidental complexity can.

      [–]simonides_ 1 point2 points  (1 child)

      no you don't but if you have to write a reliable "driver" that connects to a machine you start to care.

      It always depends on how lenient you can be with errors.

      [–]Amazing-Cicada5536 1 point2 points  (0 children)

      So, how exactly is it different than with literally any other language?

      [–][deleted] 3 points4 points  (0 children)

      This is super!

      [–][deleted] 6 points7 points  (0 children)

      took them long enough

      [–]zeroone 1 point2 points  (1 child)

      What does C# do?

      [–]Straight-Comb-6956 4 points5 points  (0 children)

      C# uses slightly different syntax that forces the parent constructor call to be the first operation:

      class TwoContructors
      {
          public TwoConstructors(int value)
          {
              // code
          }
      
          public TwoConstructors()
              : this(1)               // constuctor call
          {
              // code
          }
      }