Languages with Macro capability

Francois-Rene Rideau fare+NOSPAM@tunes.org
Wed Jan 2 12:41:02 2002


cubicle584@mailandnews.com (Software Scavenger) writes on comp.lang.lisp,
"Re: Macros in Elisp, Xlisp, Scheme, Dylan, etc.":
> Which other languages have this capability, of using the full power of
> the language in the implementation of each macro, and working with
> high level data such as lists and symbols instead of raw source code?

Popular languages with the ability to manipulate source-code
as high-level structure:
* ANSI Common LISP, maybe the first language with macro capability.
        http://www.lisp.org/
* OCAML can manipulate structured source code with camlp4.
        http://caml.inria.fr/camlp4/
* Erlang has such capability with parse_transform.
        http://www.bluetail.com/wiki/showOldPage?node=ParseTransform&index=3

More obscure languages that have compile-time reflection include
* Most Scheme dialects include some kind of CL-like defmacro,
  but no side-effect can be portably relied upon.
        http://www.schemers.org/
* Squeak, is an open implementation Smalltalk implementation:
        http://www.squeak.org/
* Maude notably builds its object system on such reflective capabilities.
        http://maude.csl.sri.com/
* Pliant is built around the concept of an open compiler
        http://pliant.cx/
* Upper/Mute is an open compiler framework:
        http://uppermute.org/
* OpenC++ is C++ extended with compile-time reflection
        http://www.hlla.is.tsukuba.ac.jp/~chiba/openc++.html
* OpenJava is Java extended with compile-time reflection
        http://www.csg.is.titech.ac.jp/~mich/openjava/
* CRML is Compile-time Reflective ML
        http://www.cse.ogi.edu/~sheard/crml.html
* FORTH is a pattern of low-level languages with compile-time reflection
 (its dialect with most advanced macro capability may be macro4th/thisforth):
        http://www.forth.org/

This list is certainly not authoritative. I'm sure there are plenty
of other systems with some kind of advanced compile-time reflection,
whereas some of the latter systems in the list might not allow as
full of a high-level reflection as you'd like. If you can send me
positive/negative feedback on how to amend this list,
it will be most welcome.

Yours freely,

[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
[  TUNES project for a Free Reflective Computing System  | http://tunes.org  ]
"I'm not a procrastinator, I'm temporally challenged"