For Programmers: Free Programming Magazines  


Home > Archive > Scheme > October 2004 > Re: Separate compilation









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Separate compilation
Bradd W. Szonye

2004-10-29, 3:58 pm

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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com