Re:Kotlin becomes second most popular language on the JVM
by pjmlp on Thursday February 06, 2020 @03:12AM
(#22254377)
It also means that Kotlin doesn't get all Java goodies, like virtual threads, value types or GPGPU support.
[ Parent
| on HN ]
Re:Kotlin becomes second most popular language on the JVM
by thu2111 on Thursday February 06, 2020 @03:50AM
(#22254542)
Virtual threads (Loom) are also not anything affecting bytecode generation, so Kotlin will work with them out of the box.
Really, I don't get this claim Kotlin will lack Java features. Most big Java upgrades these days are at the VM level. Kotlin gets those mostly for free, once they choose to upgrade to newer bytecode features (which they are slow at doing admittedly, but that's because they're in the middle of a compiler rewrite).
Re:Kotlin becomes second most popular language on the JVM
by pjmlp on Thursday February 06, 2020 @04:54AM
(#22254808)
No it won't, because Kotlin also needs to target other platforms, and exposing JVM APIs or new bytecodes needs to have to have that into consideration.
It also means that Kotlin on Android cannot just consume any random Java library, only those that are compatible with Android Java flavour of the month.
Re:Kotlin becomes second most popular language on the JVM
by thu2111 on Thursday February 06, 2020 @10:00AM
(#22256422)
Kotlin does expose JVM specific stuff though. Like the entire class library. You have to specifically opt in to the multiplatform subset to avoid that. It's not like they whitelist APIs. The only time they need to do anything to add new Java features is when the bytecode patterns change.
Re:Kotlin becomes second most popular language on the JVM
by pjmlp on Thursday February 06, 2020 @12:59PM
(#22258393)
Yeah and then funny things happen when one tries to use libraries written in Java with Kotlin ones together.
https://dev.to/martinhaeusler/why-i-stopped-using-coroutines...
https://dev.to/domnikl/kotlin-coroutines-and-javafx-threads-...
https://blog.danlew.net/2020/01/28/coroutines-and-java-synch...