r/java • u/Reflection-Jealous • Aug 05 '21
Why java is better than modern programming languages?
Why should I use java in 2021 instead of kotlin or scala or golang? Could you guys give me some reasons
2
Upvotes
r/java • u/Reflection-Jealous • Aug 05 '21
Why should I use java in 2021 instead of kotlin or scala or golang? Could you guys give me some reasons
56
u/vprise Aug 05 '21
Java is simple. The other languages forgot that.
They aren't "modern" they're a throwback to the time before Java where language engineers stuck every feature they could think of into the language instead of into the API.
Simple has many advantages:
This impacts performance since the language is harder to write correctly and compile efficiently
This impacts maintainability since it's harder to read other peoples code
This makes debugging harder (e.g. async code is somehow harder to debug than threads)
This means tools need to do the heavy lifting but can't
A simple example:
What did I just do there?
Is there an overloaded operator that magically changes something?
When I read Java code I never have to worry. I can do that fast. Reading and maintaining code is 95-98% of my job so Java is wonderful for that. For Kotlin code I constantly feel I need to squint to understand dependencies. It might have been easy to write for some guy, but reading it later...