Reflective Programming Languages
- Common Lisp
- The state of the art. It has a standard builtin metaprogramming interface, by having a standard representation of code as data. It has a standard way to absorb new language constructs, with its standard syntactic macro system, and a standard way to extend the language syntax with "reader macros". This language extension is powerful enough to allow the implementation of arbitrary sublanguages, including new object systems, logic programming, etc. However, as far as object systems are concerned, Common Lisp already has the most sophisticated one, that is also customizable through a Meta-Object Protocol. Very powerful, standardized, high-level, etc.
- It has always been an open meta-system. The standard allows for arbitrary absorption control with a very open compiler, but does not cover any standard reification. Note, however, that Forth is much too low-level for most purposes.
- Is another language in the Lisp family, with the same standard representation of code as data. Most Scheme implementations have Lisp-like macros (but not "reader macros"), but they are not standardized (only a limited flavor of "hygienic" syntactic macros is standardized). Standard Scheme is not very reflective, except that you may dynamically load files your metaprograms output (but then, the standard gives no guarantees on file access). The interest of Scheme for reflection is that it is a simple, consistent, language core, that can be (and is) used as the basis for reflective systems, by using non-standard extensions.
An example reflective extension is Moostrap.
- Self objects have all of their abstraction-breaking protocols provided by the system in "mirror" objects which reflect on the objects.
- A Compile-Time Reflective variant of ML.
This page is linked from: Methods of Reflection