Go home now Header Background Image
Submission Procedure
share: |
Follow us
Volume 16 / Issue 2

available in:   PDF (182 kB) PS (230 kB)
Similar Docs BibTeX   Write a comment
Links into Future
DOI:   10.3217/jucs-016-02-0271


Embedding Hygiene-Compatible Macros in an Unhygienic Macro System

Pascal Costanza (Vrije Universiteit Brussel, Belgium)

Theo D'Hondt (Vrije Universiteit Brussel, Belgium)

Abstract: It is known that the essential ingredients of a Lisp-style unhygienic macro system can be expressed in terms of advanced hygienic macro systems. We show that the reverse is also true: We present a model of a core unhygienic macro system, on top of which a hygiene-compatible macro system can be built, without changing the internals of the core macro system and without using a code walker. To achieve this, the internal representation of source code as Lisp s-expressions does not need to be changed. The major discovery is the fact that symbol macros can be used in conjunction with local macro environments to bootstrap a hygiene-compatible macro system. We also discuss a proof-of-concept implementation in Common Lisp and give historical notes.

Keywords: common Lisp, hygiene-compatible macro systems, scheme

Categories: D.1.1, D.3.3, D.3.4