On Thu, Jul 28, 2011 at 7:32 PM, Kenny Stone <kennethst...@gmail.com> wrote:
> Can clojure take advantage of  some features if they are available?  I know
> the JRuby dudes are pretty excited about invoke dynamic...

I'm not really sure there's a single answer to that question.

On the one hand, assuming that Java 7 doesn't outright break anything,
just using it to run new or existing Clojure code gets you any new
Hotspot optimizations, the new G1 garbage collector, and (with new
Clojure code) access to new library functionality via interop.

On the other hand, invokedynamic won't instantly get you anything. If
Clojure can benefit from it at all, one *could* in principle modify
Compiler.java to try to detect whether it's running on a JVM that
supports the instruction or not, and to generate code that uses
invokedynamic only if it is.

As for using hypothetical new library functionality to implement parts
of clojure.core or clojure.lang, that would create a big backward
compatibility headache and should probably be avoided for now. Third
party libraries that provide functionality based on, say, fork-join
can certainly be made available though.

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

-- 
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

Reply via email to