On Feb 5, 1:52 pm, Eric Lavigne <lavigne.e...@gmail.com> wrote:
> This makes me think that the original macro needs some refactoring.
> There should be a function that handles most of the work, and a macro
> to make your code shorter in the common case.
>
> (defn unquoted-param [x] (println x))
>
> (defmacro quoted-param [x] `(unquoted-param '~x))
>
> Of course, this looks silly because unquoted-param is just println,
> but I assume your real situation has a bit more to it. In general, you
> should try to use functions more often macros. Even when a macro is
> needed, it's still often best to let a function do most of the work.

Thanks Eric,

yes, the code is more complex and it is in contrib. Changing contrib
requires you to send an intercontinental mail first, as mentioned in
my other post today... :) Reason enough to first checkout the other
options and dig deeper into macros.

Will for now just try to solve it in my contrib fork.

-- 
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

Reply via email to