Hi, On Oct 9, 5:37 am, Allen Rohner <aroh...@gmail.com> wrote:
> 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. I'm not sure what you mean with the first paragraph. We do in clojureql exactly the same (with a slightly different implementation, though). That's fine. As for the clj form: I would prefer ~, because it allow to be consistent across different DSLs: syntax-quote uses it, eg. clojureql uses it, scriptjure could use it also (Not very representative, but I hope get the meaning). For the user the advantage is, that he doesn't have to learn something new. It always the same principle, it always used the same way. You now chose clj. The next implementer chooses dequote. Another one inject. Or whatever. So for each thing you have to remember how to use it. I think one strength of Clojure is its immense consistency: (alter foo + 2) (swap! foo + 2) (send foo + 2) (alter-meta! foo update-in [:x] + 2) This is easy to remember because it's always the same principle. Now suppose it would look like this: (alter foo #(+ 2 %)) ; takes no additional args, just a function (swap! + foo 2) ; function goes first (send + 2 foo) ; agent goes last It would be really great to get such consistency also across libraries, eg. by using ~ for the case at hand. Sincerely Meikel PS: Actually I think quasiquote would be a nice addition to quote and syntax-quote in core. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---