CiteULike is a free online bibliography manager. Register and you can start organising your references online.
Tags

Macros That Compose: Systematic Macro Programming

by: Oleg Kiselyov
Generative Programming and Component Engineering (2002), pp. 202-217, doi:10.1007/3-540-45821-2_13  Key: citeulike:5444827

Formatted Citation


Show HTML

Likes (beta)

This copy of the article hasn't been liked by anyone yet.

View FullText article


Abstract

Macros are often regarded as a sort of black magic: highly useful yet abstruse. The present paper aims to make macro programming more like a craft. Using R5RS Scheme macros as an example, we develop and present a general practical methodology of building complex macros systematically, by combining simpler components by functional composition or higher-order operators. Macro programming is complex because the systematic approach does not apply to many macros. We show that macros and other head-first normal-order re-writing systems generally lack functional composition. However, macros written in a continuation-passing style (CPS) always compose. Making CPS macros practical still requires an encoding for macro-continuations. We have found this missing piece, with an insight for anonymous macro-level abstractions. In the specific case of R5RS macros, this paper presents a stronger result: developing R5RS macros by a translation from the corresponding Scheme procedures. We demonstrate the practical use of the technique by elaborating a real-world example.


ConcertRG's tags for this article

Citations (CiTO)

No CiTO relationships defined

Xnote Notes for this article (1 public)


X There are no reviews yet

X Find related articles with these CiteULike tags

X Posting History


X Export records

Privacy Statement | Terms & Conditions
CiteULike organises scholarly (or academic) papers or literature and provides bibliographic (which means it makes bibliographies) for universities and higher education establishments. It helps undergraduates and postgraduates. People studying for PhDs or in postdoctoral (postdoc) positions. The service is similar in scope to EndNote or RefWorks or any other reference manager like BibTeX, but it is a social bookmarking service for scientists and humanities researchers.