"Jose A. Ortega Ruiz" <j...@gnu.org> writes:

Hi Jose,

>> I don't know scheme macros, so could you please explain why they are
>> more powerful?  What can you do with a syntax-case macro what you
>> cannot do with a Common Lisp (or Clojure) macro?
>
> In general, syntax-case lets you manipulate first-class syntax
> objects, whereby all kind of neat tricks are possible out of the box.
> You gain in expressivity.  This is a good overview:
>
>   http://blog.racket-lang.org/2011/04/writing-syntax-case-macros.html

See my last post. ;-)

> It's also possible to implement hygiene on top of defmacro (with the
> help of CLOS's symbol-macrolet:
> http://www.p-cos.net/documents/hygiene.pdf), but it's much more
> convoluted (and, IIRC, some of the syntax API is still missing in that
> long paper).

Would that solve the issue I've broad up in my last post, where the
`foo' macro expansion uses the local `my-plus' definition instead of the
global one?

If I'm not doing anything wrong there, then that effectively would mean
that you cannot guarantee that a CL macro does what it should as soon as
it uses anything that's not defined in the COMMON-LISP package (because
those things mustn't be rebound).  In that case, I'd even by the
powerfulness argument.

> Even if you don't buy the expressivity argument, i think we can agree
> that syntax-case macros are, at least, as powerful as CL macros.

Sure, I'm not trying to argument in favour of either one.  I'm just
interested in the differences.

Bye,
Tassilo

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