An issue with an interpreter is keeping semantics in sync with canonical clojure. Unfortunately, since 'Clojure' is a superset of java's semantics, it's possible to have different behavior with regards to classloading and such. Environment-as-a-value means decoupling vars and such from being globally accessible, which implies they need to be implemented as sort of a dependency-injection system with lookup detached from java classes, yet lots of implementation details of clojure rely on java-isms. One effort in this direction is immutant: http://immutant.org/news/2012/05/18/runtime-isolation/
Just something else to think about. The result might be closer to clojurescript than clojure (which I'd also be interested in, I'm thinking clojure on android-java without all the class overhead. Clojurescript and phonegap is more limited.) On Tue, Jul 9, 2013 at 2:53 PM, kovas boguta <kovas.bog...@gmail.com> wrote: > On Tue, Jul 9, 2013 at 1:22 AM, Mikera <mike.r.anderson...@gmail.com>wrote: > >> My post "The Environment as a Value" might be of interest to you. >> >> >> https://groups.google.com/forum/#!searchin/clojure-dev/immutable$20environment/clojure-dev/S8BawG7nzJA/qfCd7hn67aoJ >> >> It contains a lot of similar ideas. An important point is that you don't >> necessarily need an interpreter to get the benefits of an immutable >> isolated environment: this can still be fully compiled. >> > > Ah yes, I remember that post. > > Here is my take: It would be easier to do this first as an interpreter. > There's just fewer problems to solve that way. > > Most importantly, its possible to bypass all > JVM-implementation-detail-related issues, at least for pure Clojure code. > For instance, in an interpreter, deftype/defrecord don't need to generate > java classes. > > My idea is a little different though. An interpretive environment can do > things that a compiled one cannot. > > For instance, runtime errors can return literal code snippets, rather than > class names / line numbers. > > Or, you can a la carte assign new interpretations to functions and classes > you do not control. > > You can also change the semantics of the language itself, to support > things like partial evaluation. > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.