Live data from Hacker News

Java 21 makes me like Java again

wscp.dev

11–20 of 777 posts

Re: Java 21 makes me like Java again

#14

Can you convince me to use Java? I’ve never used it (only C++, Python, CL) but it feels bloated and dirty.

None of the memory problems of C++, the speed of C++ most of the time. Thousands of high quality libraries, a JVM that is a marvel of engineering after 20 years, tooling for development, monitoring and introspection of exceptional quality. Many of the internal tools at the largest Cloud developed in Java. Most enterprise level software. NASA extensive use of Java. A team behind the development who has stunning common sense in resisting the latest fads. Support for IEEE 754 that took years. AOT compilation...The infra behind most internet banking sites out there. Use in high speed trading.

What else do you want from the ecosystem?

Re: Java 21 makes me like Java again

#15

Can you convince me to use Java? I’ve never used it (only C++, Python, CL) but it feels bloated and dirty.

How could you possibly like C++ but feel that Java is bloated? Like I academically understand disliking Java but this just makes no sense.

C++ allows for much more terse code than java when you do small projects. It is popular in competitive programming for that reason, not just because it runs fast but also because it is really fast to write algorithms in it.

Re: Java 21 makes me like Java again

#16
The problems with Java can't be fixed by adding new things, you can't undo decades of ecosystem development, training, and ideology built on top of the idea that inheritance is really good idea and belongs everywhere.

edit: I will say that as a Java developer I am grateful every day for the improvements to the language. Java is a very impressive language and I have a lot of respect for the people working on it.

Re: Java 21 makes me like Java again

#18

The problems with Java can't be fixed by adding new things, you can't undo decades of ecosystem development, training, and ideology built on top of the idea that inheritance is really good idea and belongs everywhere. edit: I will say that as a Java developer I am grateful every day for the improvements to the language. Java is a very impressive language and I have a lot of respect for the people working on it.

I rarely see inheritance used in practice in java code bases. Except where I would use a union type or sealed class in other languages anyways. I don't feel what youre describing is a real issue.

Re: Java 21 makes me like Java again

#19
post #3

In other news, we have an upgrade path at work to go from Java 8 to Java 11 pretty soon.

Going from 11 to 21 is a lot easier.

Depends- one of the hardest parts of the 11-20 upgrade for us was that cms gc was removed.

If you run a bunch of different microservices with distinct allocation profiles, all with high allocation pressure and performance constraints, and you've accomplished this w/ the help of a very fine-tuned CMS setup, migrating that over to G1/ZGC is non-trivial

Re: Java 21 makes me like Java again

#20

Can you convince me to use Java? I’ve never used it (only C++, Python, CL) but it feels bloated and dirty.

How could you possibly like C++ but feel that Java is bloated? Like I academically understand disliking Java but this just makes no sense.

I think of Java as more bloated than C++ at runtime - with C++ I can make smaller executables that start up faster, use less memory, etc.

But if you are talking about the source code itself, then things are quite different.

Post reply on HN