DEV Community

Discussion on: Why you should NOT HATE Java!

Collapse
 
michelemauro profile image
michelemauro

Most of the reasons you cite:

  • are getting fixed in the recent releases (switch expressions, road to pattern matching, records)
  • are problems unrelated to the languages but derived from external conventions or specifications (not every object needs to be a JavaBean with all getters and setters; and nowadays, almost none)
  • can be solved with some specific projects (Quarkus will take your web application and make a native container that starts in 1/10th of the time and uses 1/10th of the memory)

More than that, there is no reason to hate almost any language: every language has its history, its ecosystem and its peculiarities. There is a problem only when you can't choose a language that is better suited to the job you have to do.

Moreover, Java has a very, very solid and high quality ecosystem, that is tamper-resistant by design: it is very, very hard to publish a java library that contains malicious code and getting away with it, because it is very difficoult to publish something on Maven Central without giving them a really good idea of who you are.

So, there are many jobs and use cases where Java is an excellent choice, and a pleasure to work with. And there are other options (Kotlin, Scala, Groovy) if you want to access the same ecosystem but want less OOP, more FP or simply less syntax.

Just keep on codin'!

Collapse
 
totally_chase profile image
Phantz

Yeah, pretty much. Java has already realized that the world has moved on, and it has started to move on as well. The new features are so beautifully functional. It's great that Java is taking a few pages from the C# book. Though even with said features, I'd pick kotlin over java any day.

The problem, though, with any mainstream language, that is widely inferior but impressively improving, is adoption. The deed has already been done. The industry is mostly bound to the ugly chains of Java 8, and not many of them are going to upgrade.

Collapse
 
michelemauro profile image
michelemauro

More recent surveys paint a slightly different picture: Snyk JVM Ecosystem Report 2021 Finds Increased Usage of Java 11 in Production.
It looks like 11 has already surpassed 8 in production. And everone is waiting for 17.
Maybe they are waiting more for the JVM than the language, but Java remains an approachable and solid solution for many use cases and many teams.

Collapse
 
sahilpabale profile image
Sahil Pabale

Yeah you are absolutely correct😊😊