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

18

u/[deleted] Jul 30 '21

[removed] — view removed comment

2

u/ArmoredPancake Jul 30 '21

How so? They're completely different things. Kotlin is just a different language at this point. With things like Jetpack Compose, Multiplatform it's unreachable for Java.

-10

u/pjmlp Jul 30 '21

Java was born to be multiplatform. Kotlin is an Android language that is all.

3

u/fletku_mato Jul 30 '21

Kotlin is not just an Android language. It is just as multiplatform as any other JVM language. I've personally written many Spring boot backends using Kotlin and loved it.

I don't think that it's a threat to Java in any way, but it has a lot of good things that are still missing from Java.

3

u/pjmlp Jul 30 '21

Kotlin has married its future to Android, and the lack JVM features that Google refuses to implement in ART.

5

u/fletku_mato Jul 30 '21

I'd genuinely want to read some sources on that.

My own experiences with Kotlin have been strictly backend development with Spring boot, so I can't say that it's a perfect fit for everything you can do with Java, but in that context it works beautifully. And why wouldn't it? After all it's just Java bytecode after compiling.

3

u/pjmlp Jul 30 '21

Every time Java will introduce concepts that Kotlin cannot adopt due to being married to multiple platforms you will end up with Kotlin's version of #ifdef aka KMM.

For example value types in classes with multiple fields, or explicit SIMD and GPGPU support, native memory handles.