It was a minor thing actually, I didn't like having to quote "user" code, and AFAIK, it's not possible to add a quasiquote as part of a macro. i.e. in my code, there is a function (_js) that does the heavy lifting, and the macro (js). I couldn't write:
(defmacro js [forms] (quasiquote (_js forms)) That and IMO, (clj foo) is slightly more readable than ~foo. Allen On Oct 8, 12:50 am, Jarkko Oranen <chous...@gmail.com> wrote: > On Oct 8, 5:01 am, Allen Rohner <aroh...@gmail.com> wrote: > > > > > > > Hello, I'd like to announce the availability of a new library, called > > Scriptjure. It's a macro that generates javascript strings from > > Clojure s-exprs. My initial use for it is in glue code for Clojure > > webapps. For example: > > > (js (fn foo [x] > > (var y 3) > > (return (+ x y)))) > > => "function foo (x) { > > var y = 3; > > return (x + y); > > }" > > > You can get the code and read the documentation > > athttp://github.com/arohner/scriptjure > > > Allen > > I took a quick look, and that looks really neat. One thing though: > Instead of the "clj" form to escape back to clojure, why not just use > "unquote" (and possibly unquote-splicing)? that would allow you to use > the ~ reader macro as a shortcut, just like in syntax-quote. > > -- > Jarkko --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---