2 ms·
https://kotlinlang.org/docs/reference/java-interop.html https://kotlinlang.org/docs/reference/java-interop.html Android is stuck on older Java versions. Kotlin
by naasking 10y ago
https://kotlinlang.org/docs/reference/java-interop.html https://kotlinlang.org/docs/reference/java-interop.html
Android is stuck on older Java versions. Kotlin brings Java 8 improvements, and more, without all the Java baggage.
- 2bitencryption 10y agoso if kotlin can bring java 8 features/improvements to a platform that is stuck on an older JVM (and not even the "true" JVM, but another implementation of it), then does that mean these features are not dependent on the runtime? If that's the case, these "java 8" features could be implemented into the Java language without needing to change the runtime? If that is true, why are these changes not being brought to Java itself, if they can be done without a change to the runtime?
- TylerE 10y agoI'm not sure if this is the case, but often it is _possible_ to implement something in, e.g., the stdlib, in a way that is _functional_, but with the right VM support it might be much more performant.
- deleted 10y ago[deleted]
- kuschku 10y agoTake for example Lambdas. Android has no invokedynamic, so every lambda has to be compiled to a class with a method. Android only allows 65k methods overall per linked unit, so that quickly becomes an issue. Kotlin, on the other hand, can do much more intelligent transformations (look at its inline functions).
- agildehaus 10y agoIs Kotlin why Google killed Jack & Jill? Do they have no intention of supporting Java 8/9?
- AlphaSite 10y agoNo, Jack & Jill were horridly poorly performing, thats why they killed them.
- yincrash 10y agoJack didn't work properly with a lot of things, so Google just changed the approach. https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html https://android-developers.googleblog.com/2017/03/future-of-...