Direct Programming vs Metaprogramming

From WikiVS, the open comparison website
Jump to: navigation, search

Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data.

All other programming can be thought of as "direct programming".

[edit] metaprogramming

Metaprogramming is typically used to create a layer of abstraction: one programming instruction may be translated into many programming instructions - so the first instruction is like an "overview" or easy-to-read description of what the computer is doing.

Metaprogramming therefore resembles, in some ways, "creating a programming language" rather than creating a program. However, a "program" and a "programming language" can sometimes be almost the same thing. For example, PHP and bash take code (instructions) as their input, and are therefore thought of as languages. But they are also programs (See Script language).

[edit] direct programming

The most direct form of programming is creating instructions that are operated upon at the hardware level with no translation. Other forms of programming may be "direct" if they are primarily concerned with sending instructions to the computer, rather than creating a new way to send instructions to the computer.

A function library (or a group of functions) may send instructions to the computer, but it generally thereby creates a "new way" to send instructions to the computer (by calling the new functions rather than the underlying software).

See Also the Following Articles

Personal tools
Namespaces
Variants
Actions
Navigation
Ads
Toolbox