The first thing I think of along these lines is codeq http://blog.datomic.com/2012/10/codeq.html
When I first heard about it, I thought it might have potential for code reuse and whole-program optimization. If you've ever imported something that causes irrelevant classes to take up space in your application's distribution, you might also wonder if it's possible to have reusable clojure code that isn't tied to java classes and classloaders. On Wed, Jun 26, 2013 at 7:01 PM, emporas <empo...@gmail.com> wrote: > Hello, I have a question that is more of a Lisp question, than Clojure > specific, but it is in the true spirit of things as 'values'. > > Now that the practice of applying collision resistant hashes (ie unique > strings), to save multiple > versions of structures with the possibility of overlapping, is becoming > less deficient thanks to better > hardware, i am wondering if there is a compiler in lisp or anything else, > that has the ability to save > multiple versions of functions, that operate only on their arguments, > better known as deterministic or > pure functions. > > A compiler like that, it could keep all of the deterministic functions > ever written, the number of the them could only increase and never > decrease. That would not solve the versioning problem, but it could > sure alleviate it. In theory, at least, integers do not vary a lot from > one platform over another, only their > performance characteristics. That could enable the compiler to keep all > the versions of those functions > the operate on integers around, and the programmer to move backwards and > run whichever function he prefers, from all their different versions over > time. > > With my poor knowledge in Lisp, i think that Lisps-2 CL/Lfe are more > appropriate for this task than > Lisps-1 Clojure/Scheme. A language like Haskell that has explicit > annotations for the functions that > are not deterministic seems very close to that idea, too. In dynamic > languages that there is no out of > the box solution for this, one could simply attach an image of a > chimpanzee scratching it's head to the > metadata of the impure functions, and solve the problem instantly! > > Does anyone know if there is any work in that area, such as compilers, > academic papers or am i horribly disguided? > > -- > -- > 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.