Robbie Carlton wrote:
> code as data is what makes lisp macros so powerful.
>
> In a c macro you have the power of a little macro language to
> manipulate strings, in a lisp macro you have the power of lisp
> language to manipulate lisp data structures. I'll elaborate.
>
> When the compiler sees a call to a macro it passes all of the
> arguments to the macro, before evaluating.
> so in a call like
>
> (dotimes (i 10)
> (do-some-crazy-thing)
> (print i))
>
> the macro dotimes is passed the list (i 10) and the list
> ((do-some-crazy-thing) (print i))
> the macro can then operate on them as data, using the full power of
> lisp. At the end of all this, the macro returns another piece of
> data, a list, which is then interpreted as a lisp form, code, and
> evaluated.
>
> If lisp code wasn't the same as lisp data, macros would be a lot less
> powerful as you would have to have two languages, one for
> manipulating lisp data, and another for manipulating lisp code (this
> is what you get in c).
>
> Hope this helps. Sorry the example isn't very enlightening, it's
> difficult to illustrate the power of macros in (< 500 words) as
> they're very complicated. If you'd like to know more* ... learn lisp
> :)

I'm by no means a Lisp expert (rather beginner) but this matches my
understanding of Lisp macros pretty well.  Maybe you can add to that that
a Lisp macro invocation looks exactly like a function invocation which at
the same time integrates it seamlessly into the language and makes it
harder to read / learn Lisp.

Maybe I missed something in the discussion but I still wonder what would
be gained by having Lisp macro like capabilities in Ruby (apart from the
fun that it'd certainly be for some of us)?  Do we actually gain
something?  Is there something that we cannot do in Ruby without this
feature and that will become utterly easy with it?  Don't get me wrong, I
don't want to put this down - I'm just wondering about the benefits.

Kind regards

    robert