The intent of this blog is to bring similarities between various advanced programming techniques to the surface, and to expose my weird view on things. If I rant, please stop me!

A meta program operates on or yields one or more programs.

Is it not typical?

Is it not compile-time?

We start off by attacking a very common misconception. No, actually two intertwined misconceptions.Some programmers have come to be believed that meta programming is the art of using the compile-time features outside of the (macro expanding) preprocessor. Some believe that meta programming is "dealing with types in a fancy way."Both groups are wrong, in my opinion.Whereas meta programs can definitely be executed during compile-time and they quite often deal with types, the basic definition - which seems to have been lost in the translative adaptation from Academia to the IT field - isThat simple. The meta program can be implemented in the same language as the target programs. It can also operate on itself, introspectively.Certain languages, such as C++, provide a quite generic type system, where one can use the same "templated" classes orto produce a set of customized types. This ismeta programming. Generic, yes, but meta level? Not really. Not if one consider the genericity to be part of the object language.It is probably the higher order of those parametric types that confuse most people in the C++ community, coming from a flat C world without differing levels of abstraction. And, indeed, meta is a higher order notion and sounds abstract... Just as some developers confuse higher-order functions and meta programming.The parametric types can be viewed as, though, since they denote a class of types, or, to use a more computer-scientific notion:. So, the termis more adequate for what templates bring to the table, at least in the most common use. One can use templates to create a proper meta level framework, such as the Boost.MPL library ( http://www.boost.org ), or some of Alexandrescu's type generation ideas ( http://sourceforge.net/projects/loki-lib ) but such use is quite distinct from the "everyday" use of templates in C++ teams.Some languages focus on runtime performance, in terms of speed and resource allocation, and keeping introspective elements in the runtime module is simply not very feasible. C++ stretched it keep some rudimentary type information - basically being a thin wrapper around the necessary virtual function table for polymorphic types.Thus, in those runtime-constrained languages, if one wants to manipulate code, including types, it has to be done before runtime, i.e., during compilation and linkage.In other languages, reflective means enable meta level programming in runtime. These languages include Java and C#.