4 ms·
Java 8 does introduce a few features that are available in Kotlin, but AFAIK Java 8 won't be available for Android for some time. In addition, Kotlin makes a lo
by hhariri 12y ago
Java 8 does introduce a few features that are available in Kotlin, but AFAIK Java 8 won't be available for Android for some time. In addition, Kotlin makes a lot of constructs more succinct, including but not limited class definitions. So it's not only about what it adds, but what it "takes away" too IMHO.
- higherpurpose 12y ago> AFAIK Java 8 won't be available for Android for some time Pretty sure it will never be available on Android. Best case scenario Google moves away from it. Worst case, it will add some new, similar features to Dalvik VM. But I doubt they are considering adopting Java 8.
- dtech 12y agoDo you have any basis for these claims? Java 8 contains many useful language improvements and Google has shown with Java 7 that it will adopt these (albeit incredibly slowly)
- frowaway001 12y agoIt has only adopted Java 7 features which are either syntactic sugar or library extensions. (E. g. everything where the Java class file version wouldn't have mattered anyway). Java 8 (and Java 9 and Java 10) are completely different, with huge, mandatory changes to the class file format and the virtual machine.
- rst 12y agoRemember the Google/Oracle lawsuits over the use of Java technology in Android? Bringing in JVM changes from newer Java releases risks giving Oracle grounds for another lawsuit (covering the patents and whatever copyrights may apply to the new features), and it's not likely Google wants to run that risk. (This is why the Java 7 features that they have adopted are the "syntactic sugar" that doesn't require JVM changes, and leaves the code running in the phones as-is.)
- curtis17 12y agoKotlin could be the Swift for Android if Jetbrains make it an explicit goal and gain developer mindshare. Also, Kotlin can compile down to JS and can thus target another Google platform - ChromeOS/Chrome - with the possibility of shared code.