higher-order macros [Re: Python syntax in Lisp and Scheme

oleg at pobox.com oleg at pobox.com
Thu Oct 9 18:52:32 EDT 2003


Macros generating macros and macros that take other macros as
arguments are quite common in Scheme. CPS-macros in particular are
higher-order macros as they take macro-continuations. Macro-lambda and
macro-apply (in syntax-rules) are further examples of higher-order
macros. Macros are closely related to multi-stage computations. In
MetaOCaml, code is just a regular value. You can write regular OCaml
functions that take, e.g., an argument of a type (char code) and
returns a value of (int->int code). These functions can be
higher-order.

Syntax-rule-level ??!lambda and ??!apply:
http://pobox.com/~oleg/ftp/Scheme/macros.html

Haskell functions as CL/Scheme macros:
http://pobox.com/~oleg/ftp/Scheme/lazy-macro-computation.txt

http://www.metaocaml.org/




More information about the Python-list mailing list