Metaprogramming is a programming technique in which computer programs have the ability to treat programs as their data; this means that a program can be designed to read, generate, analyse or transform other programs, and even modify itself while running.

Metaprogramming is a programming technique in which computer programs have the ability to treat programs as their data.

It means that a program can be designed to read, generate, analyse or transform other programs, and even modify itself while running.

In some cases, this allows programmers to minimize the number of lines of code to express a solution, and thus reducing the development time.

It also allows programs greater flexibility to efficiently handle new situations without recompilation.

history | excerpt history