Why I hate Java.

#programming #java

@n1 Nobody forces you to use all that products. You can reach the same with much less, even in Java.

@markus "Nobody forces you to ..." - I'm sorry but that's not an argument nor technical one.

Java with JVM was designed for '95 world where software was simple (very primitive comparing to contemporary software). Actually it was written and then trashed by one dude. Sun pulled it from the bin not because "what a merit" but because they needed "something" at that time.

If you want to write modern software use modern (well designed tools!) like Rust, Go or Zig. No runtime, ~0 overhead, fast.

@n1 @markus Java was not written by one guy. You are mixing up Java and JavaScript. Zig and Rust are system languages. Not really contenters to Java. By the way Zig is interesting but still some way away from beeing stable. And Go isn't really faster. The Java compiler is better in optimizing, while Go has advantages because of the different memory layout. Startup times of Go programs are better compared to non-native image Java programs.
@n1 @markus
But Java has much better abstraction possibilities than Go, which can for sure be a blessing and a curse. The biggest problem of Java is more a cultural thing than a technology thing. There is some tendency of overcomplicating things and giving a shit about memory and cpu usage. But I think this has more to do that Java is mainly used in enterprise environments than with the language itself. If you don't like Java than fine. It has weak points. But every language has.

@andhet @markus Rust and Zig are universal langs. You can write a kernel or a web framework or a CLI app with no fuss. Java was indeed written by James as Oak with a little help from Mike and Patrick. It was amazing in that time. Was.

Anyway this would need a broader discusion, time and space. I respect your knowledge and I really hope Java gets better, folks won't say stuff like "slow java" or "eats all the memory" and will install Java apps with no hesitation. Also no NullPointerExcepions.

@n1 @andhet I do respect you, too. But you cannot compare Oak with today's Java. There are 30 years of development spent into Java meanwhile, and lots of very bright guys are right now hacking really cool things into JDK 25 in this very moment, still. You already can write system extensions (check https://mostlynerdless.de/) , web frameworks and CLI app with no fuss in modern Java. I don't know in which year you stopped tracking Java's progress actively, but what you write sounds like it was 1998.
Mostly nerdless

Every two weeks a text on profiling, debugging or eBPF

Mostly nerdless
@n1 By all due respect for your persional opinion, being an #OpenJDK contributor and #JAXRS committer, I need to fully disagree. Modern #Java is perfectly suited for new software development, it is superior in many ways to Rust, Go, etc. Looking at your claims, it seems you have no understanding of modern Java at all. Proof your claims. Give numbers.
@markus I don't have the stats written down on a paper. I cannot post them. What I can tell is thrt Github is full of software, Go/Rust apps, that are "a rewrite" of Java apps. The rewrite versions are literaly X-times memory/CPU more efficient than their originals. Maybe latest Java is awesome but software world doesn't know that (yet).
@n1 Yes, those people missed at least one decade of Java progress, indeed.
@n1 @markus I will second the disagreement (if I can say so).
Java virtual machne provides a feature none of these alternatives will ever be able to provide : the continuous optimization of your code by the virtual machine itself, which guarantees that even a "basic" developer will be able to achieve good performances. But this discussion will require longer arguments than Mastodon messages, and is way more contextual and relative than absolute.
@Riduidel @markus I can agree that we cannot agree :) Once there is a Java rewrite of a Rust/Go app that is "better" in terms of hardware usage and performance or there is Java footprint in Kernel or heavy web stuff like Canva I might consider info is obsolete.