3 ms·
> I assume they can keep using Dalvik. The Dalvik VM is the only thing these threats are about. > Wouldn't it be great if Android would be based on a better l
by technomancy 16y ago
> I assume they can keep using Dalvik.
The Dalvik VM is the only thing these threats are about.
> Wouldn't it be great if Android would be based on a better language than Java?
You can already write Android apps in Python, Lua, Scheme, Ruby, Scala, Clojure, Fantom, Mirah, and Javascript. This is precisely due to the fact that Dalvik is closely related to the JVM.
- Tichy 16y agoExcept that you can't really. At least for Clojure, last time I looked it was really slow. Most dynamic languages probably make heavy use of Java reflection, which seems to be rather slow on Dalvik.
- technomancy 16y agoClojure is unique among the languages I listed because it uses persistent data structures by default (being a functional language), which necessarily generates a lot of transient garbage. The reflection problems are not specific to Dalvik; they unhinted Java calls cause slowdown on the JVM as well. But it's easy to get around this with type hints.
- Tichy 16y agoThe reviews I read pointed to reflection as the main problem of Dalvik. Are there examples of successful non-Java apps for Android yet? I have written an app in JavaScript going the HTML5 route, but it required some Java glue code. The JavaScript engine is V8 (at least on Froyo), so it is fast.