[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macros Make Me Mad [Re: Database languages]

> > So far, it sounds like the largest difference between macros and
> > source translation is in whether the output is typically rescanned.
> > (yes for a macro expander, no for a translator)
> If you just have one set of macros, then it's just the same thing as a
> source-to-source translator. However, once you *two* such translators,
> you have the problem that the extensions that each translator defines
> are unparseable by the second. If your parser knows about your macro
> system, then you can combine them both in the same program without
> difficulty. It's that integration that's the main win.

I think I understand now: if one has macros
which implicitly affect the quotation level
of a source text (2), then a translator (of
any kind, including people reading the code)
needs to know the quotation effects of all
possible translations -- leaving the obvious
solution as a centralized macro pass. (and a
well-trained group of readers?)

A) Does this also become an issue for macros
that affect binding (3) and ordering (1), or
only quotation?

B) Just as we use syntax-coloring to improve
clarity where the machine is better at lexical
analysis than the casual observer, might it
help to provide quotation-coloring to improve
clarity where the machine knows more about the
applicable macro set than the casual observer?