In
computer programming, a
metasyntactic variable is a name used in examples and understood by
hackers and programmers to stand for whatever thing is under discussion, or any random member of a class of things under discussion. The word
foo is the canonical example.
Metasyntactic variables are so called because:
- they are variables in the metalanguage used to talk about programs etc (see also pseudocode);
- they are variables whose values are often variables (as in usages like "the value of f( foo, bar ) is the sum of foo and bar").
However, it has been plausibly suggested that the real reason for the term
metasyntactic variable is that it sounds good: the term is a piece of
computer jargon.
Examples
Foo is the first metasyntactic variable commonly used. It is sometimes combined with
bar to make
foobar. This suggests that
foo may have originated with the
World War II slang term
fubar, as an acronym for
fucked up beyond all recognition.
Foo was also used as a
nonsense[?] word in the
surrealistic comic strip Smokey Stover[?] that was popular in the
1940s and
1950s. See also
Foo Fighters for more
foo etymology.
The jargon file has an extensive etymology of the word foo at [1] (http://www.catb.org/~esr/jargon/html/F/foo). The IETF also published a memo on the subject: see RFC 3092 (http://www.ietf.org/rfc/rfc3092.txt?number=3092).
baz is the third metasyntactic variable, commonly used after
foo and
bar.
After the characters in the cartoon series
The Flintstones.
xyzzy is from the
Colossal Cave Adventure
quux,
mum,
thud,
beekeeper,
hoge,
corge,
grault,
garply,
waldo,
plugh.
An earlier version of the above paraphrased a
Jargon File article
here (
http://www.catb.org/~esr/jargon/html/M/metasyntactic-variable).
All Wikipedia text
is available under the
terms of the GNU Free Documentation License