From Macrogeneration to Syntactic Abstraction

  • Authors:
  • R. Kent Dybvig

  • Affiliations:
  • Indiana University, Computer Science Department, Lindley Hall 215, Bloomington, IN 47408, USA. dyb@cs.indiana.edu

  • Venue:
  • Higher-Order and Symbolic Computation
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

In his 1967 lecture notes, Christopher Stracheystates that macrogenerators are useful as the only alternative torewriting the compiler when language extensions are needed. He alsostates, however, that they deal inappropriately with programs asstrings of symbols, ignoring their semantic content, and that theylead to inconvenient syntax and often less transparent code. Heconcludes that a goal of language designers should be to eliminatethe need for macrogeneration. This article attempts to reconcile thecontemporary view of syntactic abstraction, which deals with programsat a higher level, with Strachey's views on macrogeneration.Syntactic abstraction has evolved to address the deficiencies ofmacrogeneration 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. Whilea worthwhile goal for language designers is to reduce theneed for macrogeneration through the inclusion of an appropriate set ofbuilt-in syntactic forms, this article concludes thatsyntactic abstraction is a valuable tool for programmers to definelanguage extensions that are not anticipated by the language designeror are domain-specific and therefore not of sufficiently general use tobe included in the language core.