3 ms·
Both the Android and Spring ecosystems are very much Kotlin centric at this point. Both still support Java because there are just so many older projects out the
by jillesvangurp 6y ago
Both the Android and Spring ecosystems are very much Kotlin centric at this point. Both still support Java because there are just so many older projects out there that won't or can't switch. So Google won't come out and pull the plug on lifesupport for that just yet; though they are making it very clear that they are focusing on Kotlin in their presentations, documentation, etc.
I've been in a few conservative backend projects in the last year where they were stubbornly insisting on Java. I've managed to convince a few on a path to Kotlin.
For those not familiar with the situation. With Spring 5 & Spring Boot 2, Spring started supporting Kotlin properly (i.e. 2 years ago). It worked fine before that but now Spring comes bundled with a lot of Kotlin extension functions that bridge the gap to idiomatic Kotlin. E.g. all the reactive stuff that Spring has you can (and IMHO should as it simplifies things a lot) do using kotlin co-routines. Things like Flows, suspend functions, etc. all just work seamlessly with Spring's Flux.
Also the documentation is now updated with kotlin code examples and increasingly it seems a lot of features are more Kotlin than Java centric.
If you don't need Spring, Ktor is emerging as a nice lightweight alternative. It's more of a express.js/ sinatra style framework. You can actually use Spring in a similar way with the bundled Kotlin router DSL but not everybody does that.