metasyntactic variable


metasyntactic variable

(grammar)Strictly, a variable used in metasyntax, butoften used for any name used in examples and understood tostand for whatever thing is under discussion, or any randommember of a class of things under discussion. The word foois the canonical example. To avoid confusion, hackers never(well, hardly ever) use "foo" or other words like it aspermanent names for anything.

In filenames, a common convention is that any filenamebeginning with a metasyntactic-variable name is a scratchfile that may be deleted at any time.

To some extent, the list of one's preferred metasyntacticvariables is a cultural signature. They occur both in series(used for related groups of variables or objects) and assingletons. Here are a few common signatures:

foo, bar, baz, quux, quuux, quuuux...: MIT/Stanfordusage, now found everywhere. At MIT (but not at Stanford),baz dropped out of use for a while in the 1970s and '80s. Acommon recent mutation of this sequence inserts qux beforequux.

bazola, ztesch: Stanford (from mid-'70s on).

foo, bar, thud, grunt: This series was popular at CMU.Other CMU-associated variables include ack, barf, foo, andgorp.

foo, bar, fum: This series is reported to be common atXerox PARC.

fred, barney: See the entry for fred. These tend to beBritishisms.

toto, titi, tata, tutu: Standard series of metasyntacticvariables among francophones.

corge, grault, flarp: Popular at Rutgers University andamong GOSMACS hackers.

zxc, spqr, wombat: Cambridge University (England).

shme: Berkeley, GeoWorks, Ingres. Pronounced /shme/ with ashort /e/.

foo, bar, zot: Helsinki University of Technology,Finland.

blarg, wibble: New Zealand

Of all these, only "foo" and "bar" are universal (and baznearly so). The compounds foobar and "foobaz" also enjoyvery wide currency.

Some jargon terms are also used as metasyntactic names; barfand mumble, for example.

See also Commonwealth Hackish for discussion of numerousmetasyntactic variables found in Great Britain and theCommonwealth.

metasyntactic variable

A name given by a programmer to a file or function that is a temporary example. Names such as "foo," "thud," "blarg," "bongo," "foogle" and many others are used. If a file with such a name is later found, it is considered temporary and can be deleted. See variable and foo.