PaulHoule 9 days ago

Not dying at all. Other languages talk a good game about threads, Java has a good story about threads... and virtual threads. I'm writing large complex applications instead of fighting with the borrow checker to do what Software Tools did in the 1970s. When Valhalla drops, the performance gap will close a bit more.

  • nkzd 9 days ago

    Dying is maybe a strong word, but I think it's popularity is dropping. Couple of newer backend languages eating it's share of the pie, like Go or Typescript. I believe this trend will as more and more colleges replace Java curriculum with Python I guess.

    • dxxvi 9 days ago

      If a college replaces Java with Python, I wonder what their reasons are. Java's type system is ok (definitely not very good) but still much better than Python's which is almost empty (e.g. in Python we cannot declare an array of students, a dictionary of (ID, Student) pairs).

      • genocidicbunny 9 days ago

        From my experience, in the early programming classes that have switched from Java to Python, one of the reasons is the verbosity of Java. When you're trying to teach the basics of programming -- variables, some simple text IO, loops, functions, the structure imposed by Java can be a little overwhelming. I recall a lot of other students struggling with getting past all the little things you had to do just to get a "Hello World" written. Python is simpler to gradually introduce those concepts with, especially with very those who are just starting out. And especially when you're dealing with a quarter system, which many schools use, as a teacher you had a very limited amount of time to get through that sort of material.

        • PaulHoule 9 days ago

          Python is a great language for the non-professional programmer who wants to put their other skills on wheels. Even if other languages have more pedagogical value, Python is easy to learn and not a waste of time of time for anybody. (At work I code Java/Javascript but wrote a “maintainance droid” in Python that merges changes from git, installs database migrations, runs tests and all that so I don’t have to.)

        • seinecle 6 days ago

          You are right IMHO. Java 24 introduces a much shorter "hello world" experience with: - no class déclaration - no void, static, public statements - no System.out

          Hopefully teachers noticed...

        • zeroc8 9 days ago

          Algorithms as well. Python is close to pseudocode, which makes it a perfect fit.

      • acdha 9 days ago

        In Python isn’t that either this, for the first part of your sentence:

            students: list[tuple[int, Student]]
        
        Or the second half and a more idiomatic structure:

            students: dict[int, Student]
      • twalla 9 days ago

        IMO - verbosity, typing and compilation all get in the way of teaching a lot of the basics (logic, control flow, scope, functions, objects). With JS/Python, I think students can make small wins faster which helps them stay motivated. I say this as someone who watched 3 people decide CS wasn't for them after taking intro classes that focused on Java.

    • znpy 8 days ago

      The missing parte here is a more modern web framework.

      I played a bit with Spark/Javalin and it really felt like writing a Flask app, but on a properly multi-threaded runtime.

      I don’t need Go or python, i need a frameworks that feels like Django.

      • PaulHoule 8 days ago

        JAX-RS is basically Sinatra or Flask for Java. Not excessively verbose at all.

    • TheCoelacanth 8 days ago

      I'm pretty sure Java usage is still increasing, just not as fast as the industry in general.

stefanos82 9 days ago

Far from dying...let's just say, is no longer in the spotlight; but it's definitely there, for sure!

  • tmottabr 9 days ago

    Java was popular in enterprises and enterprises system take ages to die..

    So people will have to take care of this legacy code for ages..

    But this is the future for Java, legacy code..

    • vladsanchez 8 days ago

      COBOL story ... perhaps to a lesser extent.

m463 9 days ago

I remember when sun came out with java in the mid 90's.

I was always dumbfounded this "scripting" language, from Sun, didn't let you write code like:

   #!/usr/bin/java
   ...
I suspect lots of unix (linux) would be different if this had happened.
  • turboponyy 8 days ago

    You can do this in newer versions of Java (not sure since which), for what it's worth.

    • haglin 7 days ago

      Since JDK 11 (released in 2018).

      "Launch Single-File Source-Code Programs" https://openjdk.org/jeps/330

      • seinecle 6 days ago

        In France a local magazine for Linux enthusiasts has its cover on "Java as a language for scripting". Things are moving.

  • znpy 8 days ago

    Iirc there was sone kind of ld hack to let you run jar files via ./someApp.jar (basically telling ld how to launch a jar file)

nunez 9 days ago

COBOL, FORTRAN and C are still widely used. A butt ton of code at Google is written in Java. Java ain't goin' nowhere.