To me macros & DSLs are just an instance/extension of the DRY principle and
not that much different to using functions (albeit with more syntactic
freedom, e.g. by supplying a body expression to be wrapped or transformed
into something more complex). Of course there's the potential loss of
control & understanding when using 3rd party macros, but in Clojure the use
of library macros is often hardly enforced without also having a purely
functional way as alternative. I think the stronger reliance on certain
naming conventions (e.g. in RoR) or the type specific overriding of
operators in C++ has much more of a magical/mysterious element to it than
most of the CLJ macros I've been using thus far. Last but not least, since
most libs are open source, what stops you from studying a specific
macro/DSL?

My 2p...
On 15 Nov 2013 19:51, "Brian Craft" <craft.br...@gmail.com> wrote:

> Pulling this from another thread:
>
> On Nov 14, 2013, at 2:28 AM, Sean Johnson <bel...@acm.org> wrote:
>
> The magic of meta-programming (Ruby) vs. magic of macros (Clojure) vs. no
> magic (Python). This probably comes down to personal preference, and so is
> a potential benefit of any of them, depending on your preference, but it's
> a significant difference, so it's worth pointing out. By "magic" I just
> mean when the system seems to be more doing something much more powerful
> than you can readily see just by looking at the code. A simple few lines of
> code are doing all these wondrous things that aren't spelled out completely
> in the code (unless you peek under the covers and can understand the black
> arts that lie there). In Ruby/Rails this is the result of a lot of
> metaprogramming happening, based on conventions (that must be learned). In
> Clojure this happens through macros that implement powerful DSLs. In
> Python, it doesn't happen nearly as much. Code tends to be more transparent.
>
>
>
> This description of ruby, clojure, and python very much matches my
> experience (though with ruby I'm relying on the accounts of other
> developers that I know, since I haven't personally used ruby).
>
> Why are black arts and opaque code desirable? It's almost a tautology that
> these things are unmaintainable: you can't maintain code if you can't
> readily understand it, e.g. if it depends on "black arts", or is not
> transparent.
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to