Metasyntactic variable

HomePage | Recent changes | View source | Discuss this page | Page history | Log in |

Printable version | Privacy policy

A metasyntactic variable is a name used in examples and understood by hackers 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 (1) they are variables in the metalanguage used to talk about programs etc; (2) 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.

See foo, bar, foobar, baz, quux, fred, barney, xyzzy, thud

An earlier version of the above paraphrased a Jargon file articlehere.