Higher-Order and Symbolic Computation, 13(1/2)57-63
From Macrogeneration to Syntactic Abstraction
R. Kent Dybvig, Indiana University, Computer Science Department,
Lindley Hall 215, Bloomington, IN 47408, USA
Abstract: In his 1967 lecture notes, Christopher Strachey
states that macrogenerators are useful as the only alternative to
rewriting the compiler when language extensions are needed. He also
states, however, that they deal inappropriately with programs as
strings of symbols, ignoring their semantic content, and that they
lead to inconvenient syntax and often less transparent code. He
concludes that a goal of language designers should be to eliminate the
need for macrogeneration. This article attempts to reconcile the
contemporary view of syntactic abstraction, which deals with programs
at a higher level, with Strachey's views on macrogeneration.
Syntactic abstraction has evolved to address the deficiencies of
macrogeneration and has, to a large extent, eliminated them. Syntactic
abstractions are conveniently expressed, conveniently used, and
usually lead to more rather than less transparent code. While a
worthwhile goal for language designers is to reduce the need for
macrogeneration through the inclusion of an appropriate set of
built-in syntactic forms, this article concludes that syntactic
abstraction is a valuable tool for programmers to define language
extensions that are not anticipated by the language designer or are
domain-specific and therefore not of sufficiently general use to be
included in the language core.
Keywords: macrogeneration, syntactic abstraction
|
This article can be downloaded [here].
|
|