On Nov 27, 6:18 pm, "Henk Boom" <
lunarcri...@gmail.com> wrote:
> On 27/11/2007, Stefan Lang <
langste...@gmx.at> wrote:
>
>
>
> > That won't work because Clojure generates JVM bytecode and
> > Dalvik has its own bytecode.
>
> > (Pretty dumb move from Google, now all dynamic languages
> > for the JVM need a second backend for Dalvik, otherwise
> > most of it would have worked out of the box.)
>
> If I understand correctly the Dalvik bytecode is generated from the
> Java bytecode. It might be hard to handle the runtime compilation used
> by Clojure though.
>
Yes, although if they were to put Java bytecode-to-Dalvik bytecode
conversion into the runtime...
> "The Dalvik VM executes files in the Dalvik Executable (.dex) format
> which is optimized for minimal memory footprint. The VM is
> register-based, and runs classes compiled by a Java language compiler
> that have been transformed into the .dex format by the included "dx"
> tool."
http://code.google.com/android/what-is-android.html#runtime
>
> I've been curious for other reasons as well: what features of Clojure
> would be lost if all the compilation had to be done statically? Just
> eval, or others as well? Are those features easy enough to avoid that
> some applications could save space by not including the Clojure
> compiler in the jar?
>
It opens up the whole notion of compile-time/load-time/runtime which
are currently one and the same. Issues like - when do macros become
available, does compilation affect the global environment, eval-when
etc. There are also issues relating to the serializeability and
identity of object literals. These are not insurmountable, but not top
priority. I am thinking about it, as several people have asked, and I
am interested in having Clojure on Android.