On Thu, Dec 22, 2011 at 1:54 PM, Peter Danenberg <p...@roxygen.org> wrote: > Scheme, for instance, obeys the Law of Macro-Parsimony: "don't use > defmacro," namely, "where defn will suffice;" Clojure, on the other > hand, is macro-liberal. > > In other words, everyone seems to prefer e.g. `(defmacro foo [vars & > body] `(do ... ~@body))' where `(defn foo [vars thunk] ... (thunk))' would > suffice; cases in point: > > with-bindings > with-bindings* > with-in-str > with-local-vars > with-open > with-out-str > with-precision > with-redefs > > Why? >
with-open is the only thing on the list I use regularly. with-bindings* does actually take a thunk. fns are not free. every (fn* …) in macroexpanded source results in a new class. that being said I tend to take hairier macros and turn them into pairs of functions that take a thunk and macros that wrap their bodies in a thunk. Why do you care? > -- > 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 -- And what is good, Phaedrus, And what is not good— Need we ask anyone to tell us these things? -- 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