The state of the art for code generation is not Lisp but Pliant. Basically the main difficulty with code generation is not to make it powerful, but have it generate meaningful error messages rather than crazy code when some bad source is submitted. Through the definition of 'Expression' and 'Instruction' notions, Pliant defined a clean way to encode a program at various stages, and the rules for the code generator. S-expresions plus syntaxical substitution with a Turing machine equivalent substitution engine as opposed to just macros will bring you the power, but only the power. For extra details, just read the articles on http://www.fullpliant.org/
The state of the art for code generation is not Lisp but Pliant.
Basically the main difficulty with code generation is not to make it powerful, but have it generate meaningful error messages rather than crazy code when some bad source is submitted. Through the definition of 'Expression' and 'Instruction' notions, Pliant defined a clean way to encode a program at various stages, and the rules for the code generator. S-expresions plus syntaxical substitution with a Turing machine equivalent substitution engine as opposed to just macros will bring you the power, but only the power.
For extra details, just read the articles on http://www.fullpliant.org/