Hostname: page-component-77f85d65b8-8wtlm Total loading time: 0 Render date: 2026-03-28T07:34:42.496Z Has data issue: false hasContentIssue false

Fortifying macros

Published online by Cambridge University Press:  15 August 2012

RYAN CULPEPPER*
Affiliation:
School of Computing, Salt Lake City, Utah, USA (e-mail: ryanc@ccs.neu.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Existing macro systems force programmers to make a choice between clarity of specification and robustness. If they choose clarity, they must forgo validating significant parts of the specification and thus produce low-quality language extensions. If they choose robustness, they must write in a style that mingles the implementation with the specification and therefore obscures the latter. This paper introduces a new language for writing macros. With the new macro system, programmers naturally write robust language extensions using easy-to-understand specifications. The system translates these specifications into validators that detect misuses—including violations of context-sensitive constraints—and automatically synthesize appropriate feedback, eliminating the need for ad hoc validation code.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2012
Submit a response

Discussions

No Discussions have been published for this article.