Hacker News new | past | comments | ask | show | jobs | submit login

I can talk about this in the context of Android.

First I should point out that many large Android apps are using Kotlin. There is a lot of momentum behind Kotlin on Android, that's why Google adopted it.

Tools support is really good. Jetbrains knows how to create tools and it shows. Using kotlin also shows you how great the android plugin for java is. Nothing major, but little features like shortcuts to create a string/drawable resource are sometimes missing in kotlin. Jetbrains is missing that gap though, and we should quickly reach parity now that the language is officially supported.

Interop with Java is equally great ! Both java & kotlin output bytecode, so they can dialog easily.

Some interop caveats : - sometimes calling java from kotlin is not idiomatic. However nowadays many libs are already offering kotlin bindings and again, this should improve.

- similarly, calling kotlin from java can be a bit awkward syntactically speaking.

- kotlin guarantees nullability behavior, but this can be broken at the interface with java in a couple of cases. If the java code lack @nonnull @nullable annotations, it is up to you to handle their nullability. Similarly, kotlin classes instantiated from java code can mess with nullability. If you data class contains a nonnull property and you instantiate this class with Moshi (a json parser), if the corresponding json field is missing you end up with a null field on a nonnull property.

So it is pretty rare, but you can still end up with some NPE.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: