Skip to content
Prev 17835 / 63424 Next

access to R parse tree for Lisp-style macros?

FWIW, the latest version of the 'gtools' package includes a slightly
enhanced version of Thomas's 'defmacro' function, as well as the 'strmacro'
function that does string-based macro processing.  Feel free to take a look
at them and suggest enhancements (via patches :^)

-Greg
0064.html
Well, yes and no.  It is a syntactic shortcut using functions, but what it 
does is manipulate and then evaluate pieces of parse tree.  It doesn't 
have the efficiency under compilation that real macros would, but we don't 
have compilation.  It doesn't have gensyms, but again, R fails to support 
these in a fairly fundamental way, so they have to be faked using 
variables with weird random names.

I have a long-term plan to add real macros, but not until after Luke 
Tierney's byte-code compiler is finished.

 	-thomas

______________________________________________
R-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

----------------------------------------------------------------------
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}