[bitc-dev] DISCUSS: To macro or not to macro?
Jonathan S. Shapiro
shap at eros-os.com
Fri Jul 18 13:08:17 CDT 2008
Sandro:
Can you say what you mean by "multistaging"?
It is certainly true that a well-structured macro system can be
implemented in a pre-processor. There are two differences:
1. The macro expansion is integrated into the compiler front end.
This is mainly a matter of implementation.
2. The macro mechanism is extensible. It is certainly possible to
build extensible preprocessors, but most preprocessors have
not been extensible in this way.
shap
On Fri, 2008-07-18 at 13:16 -0400, Sandro Magi wrote:
> Ever since learning about multistaging, I've never seen the point of
> macros. I'd imagine that BitC would only want to permit one stage, and
> using staging has the advantage of retaining important type information.
>
> Staging can also permit a limited form of reflection/polytypism [1]. I
> suspect that you might consider even a single stage as a tad too
> ambitious though. :-)
>
> Sandro
>
> [1] http://okmij.org/ftp/ML/#gprint
More information about the bitc-dev
mailing list