that does programming": New age
"Modern C++ Design
" beyond OO Extreme Programming -speak
for compile time
generation of code
, especially in C++
. The usual technique there for metaprogramming is template meta-programming
(see also discussion of a ubiquitous UN*X tool
But there really is nothing new about metaprogramming! lex and yacc write (C) programs; they're not a pass of cc, but if you use make you don't really care about that. The C preprocessor also generates code, but that's really simple stuff. If you really wanted to, you could preprocess your C program with a more powerful macro processor (like M4), but most people are sensible enough not to try this.
But there's more to computing than C/C++! A good macro assembler contains a macro language powerful enough to express loops (the big selling point of C++ templates). And it even gives an orthogonal syntax, which templates don't (of course, assembler syntax is simpler than C++ syntax...).
Common Lisp's defmacro is more like it: you learned as a CS undergraduate that let is really just lambda, and that (delay expr) is really just a memoized (lambda () expr). In Lisp, you write a defmacro which does the required translations on the source code, giving a new list.
Scheme goes all the way with hygienic macros and syntax-rules: using a magical syntax that appears to write the let->lambda translation by example, and giving precise safe semantics for the translation.
Computer science has a tendency to give a new name to every concept existing elsewhere. With C++, computer science eats itself: it gives a new name to what it already has! Metaprogramming is the 90's name for 60's macro processing.