Live data from Hacker News

Java 21 makes me like Java again

wscp.dev

51–60 of 777 posts

Re: Java 21 makes me like Java again

#51
post #47
post #28

Earlier quoted context omitted.

Inheritance used to be extremely common, look at AWT/Swing - however more or less it finished there, e.g. more than 20y back. There are still lots of folks who love 'protected' and deep hierarchies, of course. There is stuff like spring that uses way too many interfaces with a single implementation, doing something a bit off the regular road ends up implementing tons of the said interfaces anew. However the 'hate' pa…

Great to hear. I used to program java in 2010 and inheritance was still beeing heavily used back then. But things change, if both the lang and the main community has change to focus more on simplicity its def worth looking at again. Coroutines and pattern matching is really good features

Contrast that, I've seen numerous Java codebases, young and old, and inheritance is very much one of the core ways that people program.

I strongly suspect that in a few cases some Java devs using net new systems and avoiding common frameworks will perhaps be able to avoid lots of inheritance but I find it insane to say that that's common or even easy.

Re: Java 21 makes me like Java again

#52
post #5

Big firms I have worked at still using Java 8. Dead.

I agree that many companies are “stuck” (through their own choice really)… but at least Java is moving now.

In many ways Java’s boringness is a feature that keeps it easily maintainable, at a low - easily recruitable - skill level.

Re: Java 21 makes me like Java again

#53
post #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…

>” None of the memory problems of C++”

I’m sorry, I’m calling BS here. You can still leak memory in Java.

Re: Java 21 makes me like Java again

#54
post #22
post #3

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

do/i/still/need/to/create/sub/directories/for/the/things/i/want/namespace?

Only if you're using vim like someone from the 70s, otherwise any sane IDE handles those things for you

But, yes, namespaces are still mapped to paths, it's not like they rewrote the JVM to use blockchain or something

Re: Java 21 makes me like Java again

#56
post #29

Earlier quoted context omitted.

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.

Sorry, what? Is not java toghether with Ruby maybe the most hardcore OOP enthusiasts that uses inheritance for "most stuff". Has the java culture move so far the last decade ?

Even in Ruby, IME, deep inheritance is fairly uncommon.

Wide inheritance through mixins is common, though.

Re: Java 21 makes me like Java again

#57

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

What's dirty is trying to get a python project reliably running on all dev computers. Pyenv, venv, wheels, suddenly you need a complete rust or c toolchain etc. With java I haven't had those kind of issues the last decade, it just works. With python it's still a big hassle and everything breaks every update.

To be fair, getting all those scientific library binaries compiled and installed was a huge pain even before python came around. Python's toolchain made it better, but only marginally in some cases.

Re: Java 21 makes me like Java again

#58
post #25

Earlier quoted context omitted.

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'll answer your question with a question: Have you seen https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... ? :) I'm guess that to those of us who remember when Java came out, "FizzBuzz: EE" is what we think of when we think of Java. :P In Java I have to type a bazillion characters to get anything done! And make all these useless directories and files and InterfaceClassFactoryProtocolStreamingSeriali…

[deleted]

Re: Java 21 makes me like Java again

#59
post #14

Earlier quoted context omitted.

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…

>” None of the memory problems of C++” I’m sorry, I’m calling BS here. You can still leak memory in Java.

You can leak memory in any language. That’s an impossible bar. The problems op is referring to is obviously about memory safety.

Java obviously isn’t thread safe like Rust is, but it’s typically safer than C++ on that front too.

Re: Java 21 makes me like Java again

#60
post #44

Earlier quoted context omitted.

What would be a modern IDE for Java? I remember programming Java in Eclipse. And it was powerful for the time, but everytime I read bloated, I automatically think Eclipse since then..

https://www.jetbrains.com/idea/

and also FOSS (Apache 2): https://github.com/JetBrains/intellij-community (as well as PyCharm found in the "python" subdirectory)
Post reply on HN