Jump to content

Metasyntactic variable

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by BlckKnght (talk | contribs) at 08:59, 26 September 2001 (new entry, mostly from the Jargon File). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Paraphrasing the Jargon file here:


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