3 ms·
ART is still Java runtime which conforms to Java memory model, GC requirements and everything that comes with it. So no, you cannot just link random other lang
by izacus 12y ago
ART is still Java runtime which conforms to Java memory model, GC requirements and everything that comes with it.
So no, you cannot just link random other languages without going through JNI. That is a common misconception. Also most of Android itself is managed Java code, so making other languages first-party citizens would require pretty much full OS rewrite. I very much doubt rewriting whole Android just to support non-JVM languages is worth it.
Making ART VM fast, efficient and adding Java 8 bytecode compatiblity is I feel a much better use of development time. Wasting precious development time to placate devs that don't want to switch languagaes is - I feel - a hugely wasted effort.
- higherpurpose 12y agoI almost wish Google loses against Oracle at the Supreme Court, and is forced to pay Oracle billions every year as long as it continues to use Java, just so it's forced to switch away from Java. Almost, because I know Google losing that lawsuit could mean dire consequences across the industry. But it's still annoying that Android has to use Java and can't change away from it.
- WildUtah 12y agoClearly a win for Oracle would be a horrible disaster for the industry and freedom of speech. It would also be a huge relief and benefit to Android programmers once it forced Google to switch the platform to a less awful language.
- danieldk 12y agoWhat stops you from using Kotlin, Scala, or other languages that are available for Java VMs?
- cwyers 12y agoThis gets asked pretty often around here, and the answer (IIRC) is that in order to use any non-Java JVM language on Android, you have to link in a lot of libraries, and you start running into limits that Android puts on how much stuff you can pack into an executable.
- izacus 12y agoWhile mostly true, use of Kotlin has been rather nice with IntelliJ. Standard library is very small and out-of-the-box IDE support with Gradle plugin helps alot.
- on_and_off 12y agodo you mean the 64k method limit ? It does no longer exist (solved in 21, and a multi dex format has been introduced for earlier releases).