The fully parenthesized Cambridge Polish syntax of Lisp, originally regarded as a temporary expedient to be replaced by more conventional syntax, possesses a peculiar virtue: A read procedure can parse it without knowing the syntax of any expressions, statements, definitions, or declarations it may represent. The result of that parsing is a list structure that establishes a standard representation for uninterpreted abstract syntax trees.
This representation provides a convenient basis for macro processing, which allows the programmer to specify that some simple piece of abstract syntax should be replaced by some other, more complex piece of abstract syntax. As is well-known, this yields an abstraction mechanism that does things that procedural abstraction cannot, such as introducing new binding structures.
The existence of that standard representation for uninterpreted abstract syntax trees soon led Lisp to a greater reliance upon macros than was common in other high-level languages. The importance of those features is suggested by the ten pages devoted to macros in an earlier paper on the evolution of Lisp [steele-1993].
However, naive macro expansion was a leaky abstraction, because the movement of a piece of syntax from one place to another might lead to the accidental rebinding of a program identifiers. Although this problem was recognized in the 1960’s, it was 20 years before a reliable solution was discovered, and another 10 before a solution was discovered that was reliable, flexible, and efficient.
In this paper, we summarize that early history with greater focus on hygienic macros, and continue the story by describing the further development and adoption of hygienic and partially hygienic macro technology in Scheme. The interplay between the desire for standardization and the development of new algorithms is a major theme of that story.
We then survey the ways in which hygienic macro technology has been adapted into recent non-parenthetical languages. Finally, we provide a short history of attempts to provide a formal account of macro processing.
Tue 22 JunDisplayed time zone: Eastern Time (US & Canada) change
18:15 - 21:00 | Tuesday EveningPapers at HOPL Chair(s): Allen Wirfs-Brock Wirfs-Brock Associates, Matthew Flatt University of Utah, USA | ||
18:15 60mTalk | A history of the Groovy programming language Papers Paul King OCI DOI | ||
19:45 75mTalk | Hygienic Macro Technology Papers DOI |