3 ms·
> Java can't simply break that. And that, in turn, answers the question of where Kotlin is different enough from Java that it might be worth switching. Java i
by Tainnor 3y ago
> Java can't simply break that.
And that, in turn, answers the question of where Kotlin is different enough from Java that it might be worth switching.
Java is very strict on backwards compatibility. That has its advantages. But it also has a lot of downsides. Kotlin doesn't want/need to be backwards compatible, and it can afford to break semantics enough to make null not allowable(*) in non-nullable types.
It's a trade-off, of course. But it explains why some people prefer Kotlin.
(*) Save for Java interop.