Announcement

Collapse
No announcement yet.

Java 21 / JDK 21 Reaches GA With Virtual Threads, Generational ZGC

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

  • #11
    Originally posted by bachchain View Post

    It only took them 28 years to notice Java's fundamental flaw.
    The change brings in a tiny amount of syntactic sugar that as they note has the goal of making it a bit more easier for complete beginners. It's not a fundamental change in any way.

    Comment


    • #12
      Originally posted by bachchain View Post

      It only took them 28 years to notice Java's fundamental flaw.
      The thing is, I don't think Sun/Oracle ever wanted Java to become the first language for the Programming 101 courses. In real world, having free-standing functions isn't that big of an improvement in large scale application development in Java, or any other language, for that matter. Static functions can easily call each other in the same class without fully qualified names. You shouldn't even use static functions that much in pure OOP. Free-standing functions won't lead to more efficient code since there's JIT. Yea, it's nice to have and makes scripting and basic programming easier, but you could even go further and not require any function definitions at all. Some languages perfectly fine execute top-level statements. In that sense, this isn't a "proper fix". But the fact that you can just type statements makes e.,g. many of the bash programs crappy as hell.

      Comment


      • #13
        Originally posted by Ironmask View Post

        My exact thoughts before coming into this thread.
        Every time I hear about a JVM update I'm always excited to hear what new tech goes into it - and then become disappointed when I realize that nobody is going to use it.
        Actually many libraries and developers have already switched to Java 9+. The largest issues here are

        - some projects simply refuse to compile their code with anything later than Java 5/6/7/8 because they want to remain compatible with obsolete versions that nobody should use anymore. E.g. Android 4.x might require some very old version of Java. They might claim that if their code doesn't use any Java N+1 (or later) features, they should target Java N.

        - some projects don't want to include a module-info file and also don't want to publish multi-release jars. Probably because they claim it complicates the build files, they use some obsolete version of Ant/Maven, or they don't have resources or will to make any changes. Some don't even want to support the automatic module name feature.

        - some authors think that Java 9 was a mistake and people should stop using anything later than Java 8 because they believe this way Oracle will eventually abandon modern Java and switch back to maintenance mode with Java 8 as a base

        - some also claim that there are too many new versions of Java and it's impossible to support anything because it will run out of support too soon. They also fear that each new version update between 9 and 21 is as large as 8 -> 9.

        - some developers think that the old ways of directly using the internals was a best way to handle things.

        - the same developers also don't see any problem using namespaces that might conflict with other projects. Because it's so damn easy to write rules for conflict handling in the build files or tell users to switch to other libraries that don't have conflicting class namespaces

        In short, the community is full of short-sighted ignorant shitheads.
        Last edited by caligula; 19 September 2023, 02:46 PM.

        Comment


        • #14
          Originally posted by Ironmask View Post

          My exact thoughts before coming into this thread.
          Every time I hear about a JVM update I'm always excited to hear what new tech goes into it - and then become disappointed when I realize that nobody is going to use it.
          I will definitely use it until end of this year in our production. And I know many different project which will switch also in the next year. We test everything with Java 20 without any issue. So I just wait for updating Spring.
          You have to realize that the world has been changed and many Java developers use containers. Then it is pretty easy to switch a version of Java. The world of big monolithic applications running in huge obsolete application servers as WebSphere or Weblogic is definitely over.

          Comment


          • #15
            Originally posted by RahulSundaram View Post

            The change brings in a tiny amount of syntactic sugar that as they note has the goal of making it a bit more easier for complete beginners. It's not a fundamental change in any way.
            My point wasn't specifically Hello World, it's the "Too much clutter for what the program does" bit, which is true of all java code. As soon as your program gets big enough to drown out the bare-minimum bloat, you start having to deal with OOP "design pattern" bloat. Why have a normal free function, when you can have an AbstractBaseProjectContractChargingPeriodProjectAc countReferenceVMFactoryBuilderStrategyFactoryManag erFactory?

            Comment


            • #16
              Originally posted by bachchain View Post

              My point wasn't specifically Hello World, it's the "Too much clutter for what the program does" bit, which is true of all java code. As soon as your program gets big enough to drown out the bare-minimum bloat, you start having to deal with OOP "design pattern" bloat. Why have a normal free function, when you can have an AbstractBaseProjectContractChargingPeriodProjectAc countReferenceVMFactoryBuilderStrategyFactoryManag erFactory?
              That is a different point since the first example is about base language constructs and your gripe seems to about design patterns that aren't fundamental to the language (Plenty of PHP code has those for example). You can write code just fine without it. Having said that, I do agree with that gripe.

              Comment


              • #17
                Originally posted by caligula View Post
                - some authors think that Java 9 was a mistake and people should stop using anything later than Java 8 because they believe this way Oracle will eventually abandon modern Java and switch back to maintenance mode with Java 8 as a base
                That is a frightening prospect.

                Comment


                • #18
                  Originally posted by archkde View Post
                  The other big issue, as I remember, was toolchain incompatibilities introduced by the modularized standard library.
                  Haven't run into that one yet. But if you happen across something that was spun off into a separate module... just pull the module?

                  Comment


                  • #19
                    Originally posted by caligula View Post

                    The thing is, I don't think Sun/Oracle ever wanted Java to become the first language for the Programming 101 courses. In real world, having free-standing functions isn't that big of an improvement in large scale application development in Java, or any other language, for that matter. Static functions can easily call each other in the same class without fully qualified names. You shouldn't even use static functions that much in pure OOP. Free-standing functions won't lead to more efficient code since there's JIT. Yea, it's nice to have and makes scripting and basic programming easier, but you could even go further and not require any function definitions at all. Some languages perfectly fine execute top-level statements. In that sense, this isn't a "proper fix". But the fact that you can just type statements makes e.,g. many of the bash programs crappy as hell.
                    That's the theory. The practice says virtually nothing can be modeled as pure OOP (just as it can't be modeled as pure functional either), so static variables, functions and classes are a thing.

                    These days I'm really liking Go's approach: functions live on their own (what would roughly be a static function in Java), unless you explicitly tie them to a struct and you have some sort of a class.
                    Last edited by bug77; 20 September 2023, 04:22 AM.

                    Comment


                    • #20
                      Dev environments updated today, test in the end of the week and produce probably in the end of the month 😉

                      BTW too bad Michael missed the most important update in the new version, the pattern matching features with languages like erlang as role model. I love it!!

                      Comment

                      Working...
                      X