Hacker News new | ask | show | jobs
by jorgemf 3326 days ago
If you have used kotlin, it seems the obvious move. I am not coming back to java, unless completely necessary. Kotlin is a great language (and more fun!).
2 comments

Kotlin is an absolute pleasure to code in, far better than Java. Add in such easy mixing with Java code, and it's by far my favorite JVM language.
Out of interest, what is wrong with Java? I found writing Android apps easy enough using Java. I am from a C++ background, so find all the C# and Java that I have to write quite simple, so I'd be intrigued to know what was "wrong" with Java.

Is it worth me looking into Kotlin? I am already halfway through investigating Swift so it seems the endless task of keeping up to date with new languages for each platform (keeping up to date with the changes in C++ and the STL is a mammoth task in itself).

There's nothing wrong with Java. It's outdated language by today's standards, a lot of code which takes 100 lines in Java would take 50 lines in Kotlin (and if we'll take autogenerated boilerplate getters/setters, it could be 1000->50), but overall Java is fine.

But I still suggest you to look into Kotlin. If you know Java, you won't spend much time learning it and with awesome IDE support you can be productive in very short time. You might find that you'll just prefer Kotlin over Java for a lot of little things which makes coding more enjoyable.

Can you elaborate on how Kotlin maintain compatibility with Java?
Kotlin can just import and use any Java class. Kotlin doesn't introduce new strings or collections, so conversions of any kind are not required. Also Kotlin compiles to Java classes which can be used from Java without any problems too.
So, Kotlin and Java are fully inter-operable without any feature loss?