On Jul 13, 2009, at 17:04, Erik Huelsmann wrote:
So, this is his take on it in XCL:
- as the CLHS documents: there can only be 1 compiler-macro per symbol
- the user is free to define his own compiler macros
The two statements above mean that the (correct) operation of the compiler should not depend on any compiler macros.
XCL uses source-transforms to make sure the user can define compiler macros for any symbol he or she likes.
Er, this would be true except for CLHS 11.1.2.1.2:
"Except where explicitly allowed, the consequences are undefined if any of the following actions are performed on an external symbol of the COMMON-LISP package: ... 3. Defining, undefining, or binding it as a macro or compiler macro. (Some exceptions are noted below.)"
That is, the implementation may rely on compiler macro definitions for CL: symbols.
There may be reasons to use a different mechanism than compiler- macros, but user redefinition is not one of them.