Re:From Java to Kotlin and Back Again
by s73v3r_ on Wednesday May 23, 2018 @03:37PM
(#17137421)
The crux of this is that they're not doing Android stuff, so they have the luxury of using Java 10.
[ Parent
| on HN ]
TBH, I think Java 10 is strictly inferior to Kotlin even when you have that option. Kotlin on the Java 10 JVM is pretty great.
Roughly half of the complaints are against Kotlin specific features or hazard of mixing Kotlin with Java libraries - I was curious since I only use Java for Android as well and have not shifted to Kotlin.
Re:From Java to Kotlin and Back Again
by forfengeligfaen on Wednesday May 23, 2018 @04:00PM
(#17137653)
I've been using Kotlin with Android for over a year. There have been few problems with SDK interoperability. Since I started using Kotlin Google blessed it. The one annoying gotcha was JSON parsing. If the fields on your models are not declared as nullable, they can still be set to null in the JSON which causes a NPE.
Re:From Java to Kotlin and Back Again
by on_and_off on Wednesday May 23, 2018 @04:05PM
(#17137711)
I have been using kotlin in prod for over a year now on Android (and I already knew the language beforehand).
I don't see myself writing full time in java again, ever.
Right, but because they were able to use Java 10, a good amount of the pain points that Kotlin was intended to address go away. On Android, you're stuck with Java 7 with one or two Java 8 features, so Kotlin helps out a lot more.
And that is perfectly fine. Java 10 and then 11 and so on will bring a lot of niceties to developers. I switched my projects to 10. Haven’t had much issue. Now I get to use var!