3 ms·
You can run other JVM languages on Android today. The Android compiler take Java byte code and translates it to Dalvik byte code. See here for Clojure: http://
by codeka 14y ago
You can run other JVM languages on Android today. The Android compiler take Java byte code and translates it to Dalvik byte code.
See here for Clojure: http://dev.clojure.org/display/design/Android+Support http://dev.clojure.org/display/design/Android+Support
"Works out of the box with 1.2.0+" -- other JVM languages should have a similar story.
- pron 14y agoNot really. Many languages emit bytecode at runtime. I saw a Clojure solution to this once which involved writing the bytecode to a local file, running the Dalvik compiler (locally, on the mobile device!) to create an apk, and loading it. Clearly, that's jumping through hoops.
- spacemanaki 14y agoThat's not really fair, tbh, (and I'm a huge fan of Clojure). It's dog-slow on Android. I don't know the details, but I think it's has a lot to do with differences between Dalvik and Hotspot.
- thebluesky 14y agoClojure is currently significantly slower than Java in general, likely due to dynamic typing. See: http://shootout.alioth.debian.org/u64q/benchmark.php?test=all&lang=clojure&lang2=java http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...
- spacemanaki 14y agoRight, but that's not terribly relevant to this thread. As I understand it the difference between Clojure on Dalvik and Java on Dalvik is much greater than Clojure on Hotspot and Java on Hotspot.