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.
[1]
Robert Hieb,et al.
Revised 5 Report on the Algorithmic Language
,
1999
.
[2]
Matthias Felleisen,et al.
Hygienic macro expansion
,
1986,
LFP '86.
[3]
Andrew Shalit,et al.
The Dylan Reference Manual
,
1996
.
[4]
Christopher Strachey,et al.
Fundamental Concepts in Programming Languages
,
2000,
High. Order Symb. Comput..
[5]
R. Kent Dybvig,et al.
Extending the scope of syntactic abstraction
,
1999,
POPL '99.
[6]
Christopher Strachey,et al.
A general purpose macrogenerator
,
1965,
Comput. J..
[7]
P. J. Landin.
The Mechanical Evaluation of Expressions
,
1964,
Comput. J..
[8]
R. Kent Dybvig,et al.
Revised5 Report on the Algorithmic Language Scheme
,
1986,
SIGP.
[9]
Robert Hieb,et al.
Syntactic abstraction in scheme
,
1992,
LISP Symb. Comput..