Hacker News new | ask | show | jobs
by thomashabets2 1282 days ago
Java is a language built up of failed experiments in language design.

My full rant about it is https://blog.habets.se/2022/08/Java-a-fractal-of-bad-experim...

It's partially my subjective opinion, but it seems that almost every single language design decision that Java made was, in retrospect, a bad one.

Not that I could have done better. It's just that none of it panned out.

3 comments

Eh... your hate is blinding you.

Java was the first mainstream garbage-collected language. Not the first GC language, but the first one to get serious traction. It started the post-C++ era.

That was a pretty bold design decision for the time, and one that worked out. The VM was another big one, and it also worked out.

I did say "almost" every single language decision.

GC wasn't a failed experiment. OOP extremism was. And the latter is a bigger Java standout than GC.

Python predates Java and is still mainstream, and while (mostly) not garbage collected, but reference counted, language design wise it's not a big difference. There have been GCd Python implementations, proving that.

Being successful is not really a language design choice, so I wouldn't count that.

> The VM was another big one, and it also worked out.

As I explain in the blog post, the VM was a colossally bad mistake. The inspiration for the VM sounds like it was better. So looks like they took the ball and started running in the wrong direction.

I think that Java made three wrong decisions.

1. Checked exceptions.

2. Crusade against properties.

3. Bad API is not being actively deprecated. StringBuffer, Vector, Date, Calendar, File. Replacements exist, but old classes are still in core.

Also I think that Java community is crazy with their love of Spring Boot. Like Spring is not magic enough, let's put more magic to autoconfigure its magic. But that's not a failure of Java.

Also, JAVA rise to popularity coincided with the rise of "design-patterns-everywhere", nothing against them where they fit. But there was a time where 'design-patterns' were the true-gospel and Java was where you go to design-pattern-church and practise your religion, everyday, everywhere !
That's not quite fair. They made 1 good design decision (killing pointers).
My graph of null pointer exceptions per second would disagree with you. It's something so common that "NPE" is a common term used when using Java.

But maybe you're saying that the decision was good, but that they failed to actually do it?