On 12 Jul 2011, at 23:18, Alan Malloy wrote:
On Jul 12, 12:01 pm, Konrad Hinsen <konrad.hin...@fastmail.net> wrote:
The composability issue with macros lies in writing them, not using
them.
Strongly disagree. Macros compose reasonably well when writing them
(eg, using let in the implementation of with-open is trivial); it's
That's not composition, that's use. What I mean by composition is
writing a complex macro in terms of simpler macros and macro
composers, just as one writes complex functions in terms of simple
functions and higher-order functions. There is no equivalent of higher-
order functions in the macro universe, for example.
composing already-written macros with other pieces of your codebase
that's hard. (reduce and xs) won't test that every element of xs is
truthy, because and is a macro and thus can't be used as a higher-
order function.
That's exactly the kind of problem I was thinking of. So in fact we
agree, except for the label to put on the problem.
Konrad.
--
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