Code Comments
Programming Forum and web based access to our favorite programming groups.Antoun Kanawati wrote: > Then again, the very presence of macros that are implemented in the > source language itself deviates significantly from conventional model. > Even the oft-cited C++ templates do not get close to this: they are > ultimately static constructs that cannot invoke any executable code > during compilation. That's not entirely true. While C++ templates cannot invoke arbitrary C++ code at compile time, the template language itself is sophisticated enough to create some of the same problems. (In particular, the ability to specialize on integer constants implies a language very similar to a Turing machine.) The SYNTAX-CASE construct goes beyond that, however. One particularly sticky issue (according to its implementors) is that a SYNTAX-CASE macro can invoke arbitrary Scheme code, including further macro expansions inside the SYNTAX-CASE code. That implies a stack of translation phases: macro expansion requires compilation, which may require macro expansion, which requires compilation, and so on. -- Bradd W. Szonye http://www.szonye.com/bradd
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.