DEV Community

Discussion on: What's new and interesting in Java?

Collapse
 
nektro profile image
Meghan (she/her)

Google's Java

Thread Thread
 
cjbrooks12 profile image
Casey Brooks

Kotlin is made by JetBrains, the brilliant folks behind Android Studio and IntelliJ, not Google. Google just encourages using Kotlin for Android development, but they do not develop it.

But yes, Kotlin is like a better syntax for Java, and fully interoperable with it. In my (very strong) opinion, new projects targeting the JVM should be written in Kotlin, not Java.

Thread Thread
 
gklijs profile image
Gerard Klijs

If it's a new project I would still much rather use Clojure instead. Part because it's more functional and has easier syntax, but mostly since it's more stable than Kotlin. I also don't like how tightly coupled Kotlin is to IntelliJ.
Also using Spring and Lombok Java is not that bad/verbose.

Thread Thread
 
cjbrooks12 profile image
Casey Brooks • Edited

I have my strong opinion because Kotlin feels very comfortable to a traditional Java dev. It's syntax, while different, has a lot of similarities and doesn't feel like an entirely new thing. Lombok is great, but you can't deny how hacky it is; Kotlin feels more like a non-hacky version of Lombok, and ultimately has a lot of similar goals: work well with normal Java code and normal Java devs, but reduce a lot of boilerplate.

I've never used Clojure, so please correct me if I'm wrong, but I do think it is more of a departure from traditional Java development, and requires a new way of thinking about code. Kotlin just encourages that new way of functional thinking, but you're more than welcome to keep doing things "the Java way".

Thread Thread
 
val_baca profile image
Valentin Baca

I've used all three, and your assessment is spot-on.

Thread Thread
 
gklijs profile image
Gerard Klijs

I think you're pretty correct about closure, it demands another way of thinking about code in a way. I just think it's a better way, but it certainly takes more effort then using Kotlin.