Writing Macros in Continuation-Passing Style (original) (raw)
2000
Abstract
The Scheme programming language has a standard mechanism for syntactic extension that is little used because it is perceived to have not enough expressive power. While there are useful transformations the standard mechanism cannot do, it is possible to create powerful and portable syntactic extensions by writing syntax transformers in a continuationpassing style. We introduce this style, and show how it may be used to perform arbitrary Turing-complete computation over expression shapes during the expansion process. We conclude with a real-world use of the technique, and evaluate the loss of clarity necessitated by the standard mechanism.
Daniel Friedman hasn't uploaded this paper.
Let Daniel know you want this paper to be uploaded.
Ask for this paper to be uploaded.