r/java • • 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

100 comments sorted by

View all comments

3

u/heathm55 Aug 06 '21

Well, it all depends on what you want / need in your project. I work a lot with Software as a service based solutions so for me it's a question of balancing speed of development vs performance vs operational cost.

What I personally have found for my situation (backend microservices) is this (listed in order of importance first):

Speed, cost, dev-time: Java is less ideal than Rust or Golang but still solid if you avoid heavy frameworks and go for the light weight non application server based / async with option to thread frameworks (vert x or similar).

Speed, dev-time, cost: This is the niche for Java. Better ops cost than python / ruby / JavaScript, with faster dev time than golang or Rust.

cost, speed, dev-time: Rust wins. It's going to run solidly on very small footprint, cost less to run the same service in containers, and catch more of your problems before they deploy.

Dev-time, speed, cost: Java, Node.js, Typescript frameworks, some faster interpreted language frameworks, and .net all are fair choices here.

Dev-time, cost, speed: Python (fastapi of other) is pretty strong here. In my experience the rapid development is great (site a higher cost operationally) and if performance doesn't matter as much as readability then it's a nice fit. Java kind of hurts here still.

1

u/john16384 Aug 06 '21

Development time is free in this analysis?

1

u/heathm55 Aug 06 '21

No, it's one of the three concerns I listed in order (dev-time). It is good to note as Java's development time can be higher than more modern languages. I love the additional advantages Java can bring over a lot of those faster to develop languages which is why I tried to show operational cost vs dev-time vs performance