4 ms·
Google will probably not be sanctioning a replacement for Java on Android for quite a while, which doesn't prevent Kotlin from being a very, very good second la
by zak_mc_kracken 12y ago
Google will probably not be sanctioning a replacement for Java on Android for quite a while, which doesn't prevent Kotlin from being a very, very good second language for the platform.
One of the main advantages of Kotlin over Scala on Android is that Kotlin is a small increment over Java with very little jar size and language overhead.
- bad_user 12y agoIf Kotlin is a small improvement over Java, then the benefits of picking it over Java are outweighed by the advantages of picking Java, by the simple fact that Java is probably the most popular language in the world and as a consequence it is being taught in schools, it has extremely good IDE support, it is very stable, the whole of Android's documentation is written for it (so you can just copy/paste stuff) and so on. Personally I do not care about how writing the actual code makes me feel or whatever, what I care about is how well the final artifact works versus the effort I've put in making it work. The act of learning and using a new language is completely useless if the new language doesn't make possible and/or comfortable new abstractions that help me in managing complexity (that would be otherwise not possible or very painful in Java). Therefore personally I'll take languages like Scala or Clojure any day, because in spite of the learning experience being painful, at least I got something out of it. N.B. - I don't really know Kotlin, I only played with it and I don't have an opinion on it yet - might turn out to be a good language for me, but I hope this will not be the reason promoted for using it, because it's a very poor reason. Granted, it could be popular, just like CoffeeScript, but then again, I also hate CoffeeScript. On the small JAR size - granted that's useful, but Android apps tend to be compressed for distribution by means Proguard and Pack2000, which does tree-shaking, not perfect but theoretically you pay for what you use and in practice it works very well, not being worse than the result of importing dependencies in your project like from Apache Commons or Google's Guava or whatever and paying a couple hundred KBs for it - which counts, but nothing tragic.