5 ms·
Big fan of Kotlin and would love to see it used more on Android. I'm still kind of flabbergasted that Google has no official (publicly known) plan to start mov
by georgemcbay 11y ago
Big fan of Kotlin and would love to see it used more on Android.
I'm still kind of flabbergasted that Google has no official (publicly known) plan to start moving away from Java given the lawsuits, general disregard for Java (keep in mind I say this as someone whose day job is Android development in Java), warm reception of Swift, etc.
I was hoping that the Android Studio/JetBrains connection would result in some sort of officially-blessed move towards Kotlin, but disappointed on that front so far.
Not that you need Google's official blessing to use Kotlin -- it works great today, but there's often political pressure not to use "fringe" languages when working on projects at most companies which is a pain to deal with and which is still forcing a lot of people to use shitty old Java 6.
- deleted 11y ago[deleted]
- incepted 11y agoNothing to be flabbergasted about, Google has an enormous involvement in Java. Maybe they started taking steps to migrate away from it but I wouldn't expect anything to be announced for years. In the meantime, like you say, Kotlin works flawlessly on Android without requiring any support from Google.
- sandGorgon 11y agoI think its gonna be Dart.The engine’s C/C++ code is compiled with Android’s NDK, and the majority of the framework and application code is running on the Dart VM. For Flutter - The Dart VM generates JIT-compiled optimized native code on the device. (In other words, the Dart VM is not an interpreter.) https://news.ycombinator.com/item?id=10521258 https://news.ycombinator.com/item?id=10521258 http://flutter.io/faq/ http://flutter.io/faq/
- PeCaN 11y agoDart always seemed like it was better suited for Android development than for web applications. Snapshots work particularly well, since the OS could manage persistence basically for free.
- incepted 11y agoDart's optional typing and performance makes it a non starter as a replacement for Java. Make no mistake: if Java is ever replaced as the main language on Android, it will be by a language that's at least as fast (which kind of implies that language has to be statically typed, at the very least).
- PeCaN 11y agoDart's performance is pretty good; its authors are VM geniuses. If it doesn't already[1], it could leverage the optional typing for block versioning on initial compilation, and assume that version is correct most of the time (generating the most-optimized version initially because you expect to not bail out of this block version). This way you wouldn't have to warm up for type inference. If the program type-checks you can get almost static type performance. Dart also has an advantage in app startup time since you can just load your snapshot. -- 1: I'm not familiar with the internals of the Dart VM, but I don't believe it leverages block versioning[2] at the moment. That seems like a low hanging fruit when you already have type hints. Your initial baseline compile can generate a specialized version from the get-go then lazily add other blocks if the type hints are wrong. 2: http://arxiv.org/abs/1411.0352 http://arxiv.org/abs/1411.0352
- incepted 11y agoThe Dart authors are geniuses but even they can't violate the laws of physics. Dart is between two and five times slower than Java, as of six months ago [1]. It's not clear whether Dart can close that gap since Java is not standing still either, so I remain completely unconvinced that Dart will ever be the replacement of Java on Android. [1] http://benchmarksgame.alioth.debian.org/u32q/dart.php http://benchmarksgame.alioth.debian.org/u32q/dart.php
- PeCaN 11y agoIt's not in any way a physical limitation that Dart is slower than Java. It's just somewhat harder to make fast, and even then, some of Dart's design is motivated by being able to implement the language efficiently. [1] Dart could even in theory have a compiler that assumes all your type annotations are correct and simply AOT compiles your code. (So your workflow would be: develop -> fix type errors -> run in regular VM -> loop -> AOT compile -> deploy.) Whether that would be useful is another matter, but it could certainly be possible (some Common Lisp implementations in fact do exactly this [2]). -- 1: https://www.dartlang.org/support/faq.html#q-why-dart https://www.dartlang.org/support/faq.html#q-why-dart 2: http://www.sbcl.org/1.0/manual/Declarations-as-Assertions.html http://www.sbcl.org/1.0/manual/Declarations-as-Assertions.ht...
- on_and_off 11y agoI would love to see Google move to Kotlin. Sadly the official response of the Android frameworks team is that they have no plan to do so in the near future since : -if you want to write your app in Kotlin, you can already do so. It is completely supported by Android (even though truthfully you don't have idiomatic support of Kotlin in the platform's API). -moving to Kotlin would be a very big commitment for the platform and there are some big questions to answer like what about the people who want to write Java ? Still, if in 2 years a good chunk of the community has moved to Kotlin, it might be reason enough for them to reconsider. Some members of the Android teams are already using Kotlin extensively, for exemple in the DataBinding library.
- xiaoma 11y agoFrom what I've seen Google doesn't really care that much about what external devs want. I've seen multiple videos in which people ask about support for Scala, Python or even Java 8 and in each one the Google developer evangelist seems to have difficulty understanding why people would even want anything other than old versions of Java.
- on_and_off 11y ago>in which people ask about support for Scala, Python or even Java 8 supporting the language of the moment is a terrible idea.