[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: are dylan macros Turing-complete?



Rainer Joswig writes:
 > For non-top-level macros I often want to manipulate the
 > identifier names. This is for example not possible
 > with Scheme-Macros. They are only supporting little
 > rewriting of list structures - but not for example
 > of names. Example (pardon the prefix syntax):
 > 
 > (with-foo "bar" (baz)) -> (let ((foo-bar ...)) ... (baz)) 
 > 
 > In Scheme I can't compute the foo-bar symbol via
 > macros.

You can't do this with R5RS "syntax-rules", but you can do it with
"syntax-case", which exists in Chez and PLT implementations.

http://www.scheme.com/tspl2d/syntax.html#g2270
http://download.plt-scheme.org/doc/mzscheme/mzscheme-Z-H-11.html#%_sec_11.2.1

I don't know enough about Dylan macros to say if they are more like
"syntax-rules" or "syntax-case"; I suspect they sit somewhere in
between.

--dougo@ccs.neu.edu