Re: idiot question about macros

2013-06-09 Thread David Pollak
Ben, Thanks for the feedback... and I'm sorry it to so long to say thanks (I've been traveling). In terms of the lack of being hygienic, I discuss that in the next paragraph in the blog post the OP took the macro from. But I really appreciate your thoughts on error messages. As I develop macros,

Re: idiot question about macros

2013-06-07 Thread Ben Wolfson
On Fri, Jun 7, 2013 at 12:30 PM, David Pollak wrote: > > > > On Fri, Jun 7, 2013 at 11:14 AM, Ben Wolfson wrote: > >> >> >> The macro (which IMO is terrible and shouldn't be emulated) >> > > Why do you think the macro is terrible? > It's unnecessarily unhygienic: user> (require '[clojure.core.

Re: idiot question about macros

2013-06-07 Thread David Pollak
On Fri, Jun 7, 2013 at 11:14 AM, Ben Wolfson wrote: > On Fri, Jun 7, 2013 at 11:09 AM, larry google groups < > lawrencecloj...@gmail.com> wrote: > >> >> I am very stupid and I am having trouble figuring out how to read >> this: >> >> (defmacro match-func [& body] `(fn [~'x] (match [~'x] ~@body)))

Re: idiot question about macros

2013-06-07 Thread Ben Wolfson
On Fri, Jun 7, 2013 at 11:09 AM, larry google groups < lawrencecloj...@gmail.com> wrote: > > I am very stupid and I am having trouble figuring out how to read > this: > > (defmacro match-func [& body] `(fn [~'x] (match [~'x] ~@body))) > > ((match-func [q :guard even?] (+ 1 q) [z] (* 7 z)) 33) > ;;