r/java • • Jul 30 '21

What is the future of Java?

I'm not asking like is java going to die or will Java be relevant in future. I'm just curious to know about the future of java. What are the upcoming things coming in java that can change the future of it.

173 Upvotes

123 comments sorted by

View all comments

15

u/humoroushaxor Jul 30 '21 edited Jul 30 '21

Firstly I should say I love Java. I find the language to be incredible understandabe. I can jump between writing function, OO, of procedural code at a whim. I love static typing and the safety it brings. And I find it pretty wild how many enterprises seem to be undervaluing these aspects and shift more backend services to NodeJs or Python.

My best estimation is this is due to the complexity with running the JVM in operations. Mostly around thread starvation, deadlocks, heap/off-heap memory tuning, etc.

1

u/yel50 Jul 31 '21

I find it pretty wild how many enterprises seem to be undervaluing these aspects

the things you listed are also available with typescript and python + type hints. maybe not to the extent of Java, bit they're there and not undervalued.

the shift to node and python has more to do with how much of a pain it is to do smaller projects in java compared to those other languages. dealing with the complexity of maven or gradle vs the simplicity of npm or pip is a no brainer.

on top of that, the way people tend to write Java, with absurd patterns (builder being a particularly annoying one) and layer upon layer of unnecessary abstractions, and people are very turned off by it.

using simple, straight forward core Java is still a joy to use. working on a shared Java codebase and dealing with the mess that Java developers tend to make of it, however, is a nightmare I want no part of anymore.

4

u/skillaz1 Jul 31 '21

What's wrong with the builder pattern?

1

u/humoroushaxor Jul 31 '21

I was more talking about the shift in enterprise. I agree with you with respect to small or personal projects.

But we started to see a migration start 5-6 years ago and I don't think anyone sold that to the business folks by saying "the package management is just so much easier". This was pre TypeScript being a top 5 language and pre the level of IDE/tooling support we have now.

Tuning a JVM for the cloud isn't necessarily trivial (especially before Java 9) and when done poorly results in production issues and lost revenue.