Yes, but for present purposes I'm stuck in Java proper. I'll try using Clojure's compile to build a Java class with a method that builds an s-expression based on its arguments and evals it. If this works it will be simpler than constructing clojure.lang.* objects and Compile.eval()ing them.
On Mon, Oct 12, 2009 at 6:42 PM, John Harrop <jharrop...@gmail.com> wrote: > On Mon, Oct 12, 2009 at 5:10 PM, Garth Sheldon-Coulson < > garth.sheldoncoul...@gmail.com> wrote: > >> Rich wrote somewhere that he wanted to make it possible for Java >> applications to build Clojure s-expressions dynamically and pass them to an >> embedded Clojure compiler/evaluator. >> >> I'm not talking about evaluating strings of Clojure-syntax text. I'm >> talking about building up the actual s-expressions from symbols and lists >> and objects such as integers and strings. >> >> Can I, for instance, create a new s-expression object of some kind in Java >> and bang on it (or functionally construct it), adding new elements until I >> have a full s-expression, and then pass it to a Clojure evaluator object, >> getting an s-expression as output? > > > Can't you already do this in Clojure itself, using a macro, or at run-time > using a macro-like function and an explicit call to eval? > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---