DEV Community

Discussion on: Is Rust going to Replace Java?

 
gklijs profile image
Gerard Klijs

Yes, and likely it's won't be much longer before Java 17 is supported. Spring is likely to take a year before going to 17. If it's not possible by then, it's going to be a major deal breaker. Originally people used Kotlin mostly because they were stuck on also JVM's with Android. Kotlin also has other compile targets, like native and js. But I think they are still used very little.

Thread Thread
 
therickedge profile image
Rithik Samanthula

Despite all the differences between the two languages, Java and Kotlin are 100% interoperable. You can call Kotlin code from Java, and you can call Java code from Kotlin.

Thread Thread
 
gklijs profile image
Gerard Klijs

Not 100%, you can't call a coroutine from Java, and you can't use Java Code that contains records for the moment. But yes, it all runs on the JVM, as does Scala, Groovy and Clojure, which you could use all together in one app.

Thread Thread
 
gklijs profile image
Gerard Klijs

Seems you can use Java records with Kotlin (and even define them in Kotlin)
kotlinlang.org/docs/jvm-records.ht...