r/java • • Apr 20 '21

Java is criminally underhyped

https://jackson.sh/posts/2021-04-java-underrated/
291 Upvotes

295 comments sorted by

View all comments

34

u/post_depression Apr 20 '21

I would never understand why people hate Java. Being a java lover I ask them about their reasons, and here are the common answers:

  1. I don’t understand Java. (Well is that really Java’s fault?)

  2. It’s too much boilerplate code. (Well, I agree, but I always love verbose languages. Reason why I also love TypeScript)

  3. “... but, but, but ... you could do that in Python in only 3 lines!” (Have you ever heard of Generics and the Collections Framework ... or lambda expressions?)

The problem I have seen is not that almost everyone will only learn the ancient bits of Java. Most books and online tutorials teach Java in that way. These people never gets to realise that Java has evolved over time to compete with the “modern languages” and have most of those features in one way or the other.

-4

u/Freyr90 Apr 20 '21

I would never understand why people hate Java.

  1. Weak and not very expressive language.

This leads to tons of obscure code generation that could rival with GObject. Lombok and Spring are good examples.

2) Tooling typically is not very friendly towards text editors, XML configs everywhere, hard to write code without bloated IDE with tons of plugins.

1

u/Muoniurn Apr 21 '21

How is it weak and not very expressive? It’s not Haskell, but people created vavr with it and the like. Lombok has nothing to do with expressivity, it’s for boilerplate reduction. And spring is a really complex framework with functionality for everything. It uses DI and the like for modularity. Hell, being able to create such a DI fw is a plus for Java’s strength.

1

u/Freyr90 Apr 21 '21

How is it weak and not very expressive?

It's so unexpressive that people have to use code generation to build basic stuff like immutable records without pain of creating Builders manually.

Lombok has nothing to do with expressivity, it’s for boilerplate reduction

Boilerplate is exactly the evidence of Java being a very inexpressive language. Patterns are features re-created with code.

When your language lacks important features, you adhere to patterns, hence boilerplate. C programmers use GObject, Java programmers write Builders etc.

The popularity of Lombok and alike proves that it's very hard and tedious to write Java without code generation facilities, helping with boilerplate.

→ More replies (2)