Settings

Theme

Java is dying and it paid off my mortgage

alyosha.net

20 points by nkzd 10 months ago · 23 comments

Reader

PaulHoule 10 months 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.

  • nkzdOP 10 months 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 10 months 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 10 months 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 10 months 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 10 months 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 10 months ago

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

      • acdha 10 months 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 10 months 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.

      • franktankbank 10 months ago

        https://docs.python.org/3/library/typing.html

        I don't think its first class support but its something. It might even be better for teaching since its not strictly enforced depending on your runtime.

    • znpy 10 months 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.

    • TheCoelacanth 10 months ago

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

stefanos82 10 months ago

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

  • tmottabr 10 months 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..

m463 10 months 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.
nunez 10 months 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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection