Metasyntactic variable
Redirected from Foo
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:
The jargon file has an extensive etymology of the word foo at [1] (http://www.catb.org/~esr/jargon/html/F/foo.html). The IETF also published a memo on the subject: see RFC 3092 (http://www.ietf.org/rfc/rfc3092.txt?number=3092).
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.
Table of contents
1 Examples
Examples Foo and Bar
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.
Baz
baz is the third metasyntactic variable, commonly used after foo and bar.
Fred & Barney
After the characters in the cartoon series The Flintstones.
xyzzy
xyzzy is from the Colossal Cave Adventure
Other examples
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.html).