<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://afropedia.world/index.php?action=history&amp;feed=atom&amp;title=Metasyntactic_variable</id>
	<title>Metasyntactic variable - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://afropedia.world/index.php?action=history&amp;feed=atom&amp;title=Metasyntactic_variable"/>
	<link rel="alternate" type="text/html" href="https://afropedia.world/index.php?title=Metasyntactic_variable&amp;action=history"/>
	<updated>2026-08-06T07:48:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://afropedia.world/index.php?title=Metasyntactic_variable&amp;diff=583&amp;oldid=prev</id>
		<title>Djehuti: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://afropedia.world/index.php?title=Metasyntactic_variable&amp;diff=583&amp;oldid=prev"/>
		<updated>2024-05-31T19:48:58Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Placeholder term used in computer science}}&lt;br /&gt;
{{About|metasyntactic variables in computer science and programming|metasyntactic variables as used in formal logic|Metavariable (logic)|usage in spoken languages|Placeholder name}}&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;metasyntactic variable&amp;#039;&amp;#039;&amp;#039; is a specific word or set of words identified as a [[placeholder name|placeholder]] in [[computer science]] and specifically [[computer programming]]. These words are commonly found in [[source code]] and are intended to be modified or substituted before real-world usage. For example, [[Foobar|&amp;#039;&amp;#039;&amp;#039;foo&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;bar&amp;#039;&amp;#039;&amp;#039;]] are used in over 330 [[Internet Engineering Task Force]] [[Request for Comments|Requests for Comments]], the documents which define foundational internet technologies like [[HTTP]] (web), [[TCP/IP]], and [[email]] [[Communications protocol|protocol]]s.&amp;lt;ref name=&amp;quot;RFC3092&amp;quot;&amp;gt;{{cite IETF|rfc=3092|title=Etymology of &amp;quot;Foo&amp;quot;|first1=Donald E.|last1=((Eastlake 3rd))|first2=Carl-Uno|last2=Manros|first3=Eric S.|last3=Raymond}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=https://www.rfc-editor.org/retrieve/|title=Document Retrieval|work=RFC Editor}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By mathematical [[analogy]], a [[metasyntax|metasyntactic]] variable is a word that is a [[Variable (mathematics)|variable]] for other words, just as in [[algebra]] letters are used as variables for [[number]]s.&amp;lt;ref name=&amp;quot;RFC3092&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Metasyntactic variables are used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept, which is useful for teaching programming.&lt;br /&gt;
&lt;br /&gt;
==Common metasyntactic variables==&lt;br /&gt;
Due to English being the foundation-language, or [[lingua franca]], of most computer programming languages, these variables are commonly seen even in programs and examples of programs written for other spoken-language audiences.&lt;br /&gt;
&lt;br /&gt;
The typical names may depend however on the subculture that has developed around a given [[programming language]].&lt;br /&gt;
&lt;br /&gt;
===General usage===&lt;br /&gt;
Metasyntactic variables used commonly across all programming languages include &amp;#039;&amp;#039;[[foobar]]&amp;#039;&amp;#039;, &amp;#039;&amp;#039;foo&amp;#039;&amp;#039;, &amp;#039;&amp;#039;bar&amp;#039;&amp;#039;, &amp;#039;&amp;#039;baz&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|qux}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|quux}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|corge}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|grault}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|garply}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|waldo}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|fred}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;{{not a typo|[[plugh]]}}&amp;#039;&amp;#039;, &amp;#039;&amp;#039;[[xyzzy (computing)|{{not a typo|xyzzy}}]]&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;thud&amp;#039;&amp;#039;.&amp;lt;ref name=&amp;quot;RFC3092&amp;quot;/&amp;gt;&amp;lt;ref&amp;gt;{{cite mailing list|title=Metasyntactic variable|first=Stuart|last=Laughlin|date=November 18, 2016|access-date=November 18, 2016|url=https://www.progclub.org/pipermail/programming/2016-November/002305.html|mailing-list=programming@ProgClub|url-status=dead|archive-url=https://web.archive.org/web/20221202085628/https://www.progclub.org/pipermail/programming/2016-November/002305.html|archive-date=December 2, 2022}}&amp;lt;/ref&amp;gt; Two of these words, &amp;#039;&amp;#039;plugh&amp;#039;&amp;#039; and &amp;#039;&amp;#039;xyzzy&amp;#039;&amp;#039;, are taken from the game &amp;#039;&amp;#039;[[Colossal Cave Adventure]]&amp;#039;&amp;#039;.&amp;lt;ref&amp;gt;{{cite web |url=https://jerz.setonhill.edu/if/crowther/advdat.77-03-11 |title=advdat.77-03-11 |last=Crowther |first=Will |date=1977-03-11 |website= Colossal Cave Adventure Source Code |publisher=Dennis G. Jerz |access-date=2024-02-28}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A complete reference can be found in a [[MIT Press]] book titled &amp;#039;&amp;#039;[[The Hacker&amp;#039;s Dictionary]]&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
===Japanese===&lt;br /&gt;
In Japanese, the words {{transl|ja|hoge}} (ほげ)&amp;lt;ref&amp;gt;{{Cite web|url=https://ejje.weblio.jp/content/hoge|title=hogeの意味・使い方 - 英和辞典 Weblio 辞書|website=ejje.weblio.jp}}&amp;lt;/ref&amp;gt; and {{transl|ja|fuga}} (ふが) are commonly used, with other common words and variants being piyo (ぴよ), {{transl|ja|hogera}} (ほげら), and {{transl|ja|hogehoge}} (ほげほげ).&amp;lt;ref name=&amp;quot;ja&amp;quot;&amp;gt;[[:ja:メタ構文変数|メタ構文変数]] {{in lang|ja}}&amp;lt;/ref&amp;gt;{{Circular reference|date=September 2017}} The origin of {{transl|ja|hoge}} as a metasyntactic variable is not known, but it is believed to date to the early 1980s.&amp;lt;ref name=&amp;quot;ja&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===French===&lt;br /&gt;
In France, the word &amp;#039;&amp;#039;toto&amp;#039;&amp;#039; is widely used, with variants &amp;#039;&amp;#039;tata&amp;#039;&amp;#039;, &amp;#039;&amp;#039;titi&amp;#039;&amp;#039;, &amp;#039;&amp;#039;tutu&amp;#039;&amp;#039; as related placeholders. One commonly-raised source for the use of &amp;#039;&amp;#039;toto&amp;#039;&amp;#039; is a reference to the stock character used to tell jokes with [[Tête à Toto]].{{CN|date=February 2022}}&lt;br /&gt;
&lt;br /&gt;
===Turkish===&lt;br /&gt;
In Turkey, the words &amp;#039;&amp;#039;hede&amp;#039;&amp;#039; and &amp;#039;&amp;#039;hödö&amp;#039;&amp;#039; (usually spelt &amp;#039;&amp;#039;hodo&amp;#039;&amp;#039; due to [[ASCII]]-only naming constraints of programming languages) are well-known metasyntactic variables stemmed from popular humorous cartoon magazines of the 90&amp;#039;s like LeMan. The words do not mean anything, and specifically used in place of things that do not mean anything. The terms have been popularized to the masses by the actor and stand-up comedian [[Cem Yılmaz]] in the late 90&amp;#039;s and early 2000&amp;#039;s.&amp;lt;ref&amp;gt;{{Cite book |url=https://books.google.com/books?id=dRxdDwAAQBAJ&amp;amp;dq=hede+h%C3%B6d%C3%B6&amp;amp;pg=PA12 |title=LeMan Dergisi 1376. Sayı |publisher=Lm Basin Yayin Ltd.şti. |language=tr}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Italian===&lt;br /&gt;
In the Italian software programming culture, it is common to encounter names of Walt Disney characters being used as variables. These names often appear in pseudo-code, are referenced in Software Engineering classes, and are commonly employed when explaining algorithms to colleagues. Among the most frequently used are &amp;quot;pippo&amp;quot; (Goofy), &amp;quot;pluto,&amp;quot; and &amp;quot;paperino&amp;quot; (Donald Duck). &amp;lt;ref&amp;gt;{{Cite web|url=http://www.catb.org/jargon/html/M/metasyntactic-variable.html|title=The Jargon File - metasyntactic variable|website=www.catb.org/}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;German&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
In the German software programming culture, it is common to encounter &amp;#039;&amp;#039;Klaus&amp;#039;&amp;#039; as a placeholder class name, due to the german word for &amp;quot;class&amp;quot; being &amp;quot;Klasse&amp;quot;.&amp;lt;ref&amp;gt;{{Cite web |title=Wikipedia, die freie Enzyklopädie |url=https://www.wikipedia.de/ |access-date=2024-05-22 |website=www.wikipedia.de}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage examples ==&lt;br /&gt;
[[File:Metasyntactic Variable FOO in Shell.png|thumb|A screenshot of a metasyntactic variable FOO assigned and echoed in an interactive shell session.]]&lt;br /&gt;
&lt;br /&gt;
===C===&lt;br /&gt;
{{See also|C programming language}}&lt;br /&gt;
In the following example the function name &amp;lt;code&amp;gt;foo&amp;lt;/code&amp;gt; and the variable name &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; are both metasyntactic variables. Lines beginning with &amp;lt;code&amp;gt;//&amp;lt;/code&amp;gt; are comments.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// The function named foo&lt;br /&gt;
int foo(void)&lt;br /&gt;
{&lt;br /&gt;
   // Declare the variable bar and set the value to 1&lt;br /&gt;
   int bar = 1;&lt;br /&gt;
&lt;br /&gt;
   return bar;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===C++===&lt;br /&gt;
{{See also|C++}}&lt;br /&gt;
Function prototypes with examples of different [[Parameter (computer programming)#Argument passing|argument passing]] mechanisms:&amp;lt;ref name=&amp;quot;MonganKindler2012&amp;quot;&amp;gt;{{cite book|first1=John|last1=Mongan|first2=Noah|last2=Kindler|first3=Eric|last3=Giguere|title=Programming Interviews Exposed: Secrets to Landing Your Next Job|url=https://books.google.com/books?id=GQE4r2e5fAsC&amp;amp;pg=PA242|year=2012|publisher=John Wiley &amp;amp; Sons|isbn=978-1-118-28720-0|page=242}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void Foo(Fruit bar);&lt;br /&gt;
void Foo(Fruit* bar);&lt;br /&gt;
void Foo(const Fruit&amp;amp; bar);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example showing the [[function overloading]] capabilities of the C++ language&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void Foo(int bar);&lt;br /&gt;
void Foo(int bar, int baz);&lt;br /&gt;
void Foo(int bar, int baz, int qux);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Python===&lt;br /&gt;
[[Spam (food)|Spam]], [[ham]], and [[Egg (food)|eggs]] are the principal metasyntactic variables used in the [[Python programming language]].&amp;lt;ref&amp;gt;{{Cite web|url=https://docs.python.org/3/tutorial/|title=The Python Tutorial — Python 3.8.1 documentation|website=docs.python.org}}&amp;lt;/ref&amp;gt; This is a reference to the famous comedy sketch, &amp;quot;[[Spam (Monty Python)|Spam]]&amp;quot;, by [[Monty Python]], the eponym of the language.&amp;lt;ref&amp;gt;{{Cite web |date=2021-09-04 |title=General Python FAQ — Python 3.9.7 documentation |url=https://docs.python.org/3/faq/general.html |url-status=live |archive-url=https://web.archive.org/web/20210826153036/https://docs.python.org/3/faq/general.html#why-is-it-called-python |archive-date=2021-08-26 |access-date=2021-09-05 |website=docs.python.org |publisher=Python Software Foundation |at=Why is it called Python?}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
In the following example &amp;lt;code&amp;gt;spam&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ham&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;eggs&amp;lt;/code&amp;gt; are metasyntactic variables and lines beginning with &amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; are comments.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# Define a function named spam&lt;br /&gt;
def spam():&lt;br /&gt;
&lt;br /&gt;
    # Define the variable ham&lt;br /&gt;
    ham = &amp;quot;Hello World!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # Define the variable eggs&lt;br /&gt;
    eggs = 1&lt;br /&gt;
&lt;br /&gt;
    return&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===IETF Requests for Comments===&lt;br /&gt;
Both the [[IETF]] [[Request for Comments|RFC]]s and [[computer programming language]]s are rendered in [[plain text]], making it necessary to distinguish metasyntactic variables by a naming convention, since it would not be obvious from context.&lt;br /&gt;
&lt;br /&gt;
Here is an example from the official [[IETF]] document explaining the [[e-mail]] protocols (from RFC 772 - cited in RFC 3092):&lt;br /&gt;
  All is well; now the recipients can be specified.&lt;br /&gt;
 &lt;br /&gt;
      S: MRCP TO:&amp;lt;Foo@Y&amp;gt; &amp;lt;CRLF&amp;gt;&lt;br /&gt;
      R: 200 OK&lt;br /&gt;
 &lt;br /&gt;
      S: MRCP TO:&amp;lt;Raboof@Y&amp;gt; &amp;lt;CRLF&amp;gt;&lt;br /&gt;
      R: 553  No such user here&lt;br /&gt;
 &lt;br /&gt;
      S: MRCP TO:&amp;lt;bar@Y&amp;gt; &amp;lt;CRLF&amp;gt;&lt;br /&gt;
      R: 200 OK&lt;br /&gt;
 &lt;br /&gt;
      S: MRCP TO:&amp;lt;@Y,@X,fubar@Z&amp;gt; &amp;lt;CRLF&amp;gt;&lt;br /&gt;
      R: 200 OK&lt;br /&gt;
 &lt;br /&gt;
   Note that the failure of &amp;quot;Raboof&amp;quot; has no effect on the storage of&lt;br /&gt;
   mail for &amp;quot;Foo&amp;quot;, &amp;quot;bar&amp;quot; or the mail to be forwarded to &amp;quot;fubar@Z&amp;quot;&lt;br /&gt;
   through host &amp;quot;X&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
(The documentation for texinfo emphasizes the distinction between metavariables and mere variables used in a programming language being documented in some texinfo file as: &amp;quot;Use the @var command to indicate metasyntactic variables. A metasyntactic variable is something that stands for another piece of text. For example, you should use a metasyntactic variable in the documentation of a function to describe the arguments that are passed to that function. Do not use @var for the names of particular [[Variable (programming)|variables]] in programming languages. These are specific names from a program, so @code is correct for them.&amp;quot;&amp;lt;ref&amp;gt;{{cite web |url=http://sunsite.ualberta.ca/Documentation/Gnu/texinfo-4.0/html_chapter/texinfo_10.html |title=Marking Words and Phrases |work=Texinfo 4.0. The GNU Documentation Format|access-date=2012-11-25 |url-status=dead |archive-url=https://web.archive.org/web/20091106004856/http://sunsite.ualberta.ca/Documentation/Gnu/texinfo-4.0/html_chapter/texinfo_10.html |archive-date=2009-11-06 }}&amp;lt;/ref&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Another point reflected in the above example is the convention that a metavariable is to be uniformly substituted with the same instance in all its appearances in a given schema. This is in contrast with [[nonterminal]] symbols in [[formal grammars]] where the nonterminals on the right of a production can be substituted by different instances.&amp;lt;ref name=&amp;quot;Tennent2002&amp;quot;&amp;gt;{{cite book|author=R. D. Tennent|title=Specifying Software: A Hands-On Introduction|year=2002|publisher=Cambridge University Press|isbn=978-0-521-00401-5|pages=36–37 and 210}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example data==&lt;br /&gt;
===SQL===&lt;br /&gt;
It is common to use the name [[Acme Corporation|ACME]] in example [[SQL]] [[Database]]s and as placeholder company-name for the purpose of teaching. The term &amp;#039;ACME Database&amp;#039; is commonly used to mean a training or example-only set of database data used solely for training or testing. &lt;br /&gt;
ACME is also commonly used in documentation which shows SQL usage examples, a common practice with in many educational texts as well as technical documentation from companies such as [[Microsoft]] and [[Oracle Corporation|Oracle]].&amp;lt;ref name=&amp;quot;Kriegel 2008 p.&amp;quot;&amp;gt;{{cite book | last=Kriegel | first=Alex | title=SQL bible | publisher=Wiley | publication-place=Indianapolis, Ind | year=2008 | isbn=978-0-470-22906-4 | oclc=402446308 }}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Ruel 2014 p.&amp;quot;&amp;gt;{{cite book | last=Ruel | first=Chris | title=Oracle 12c for dummies | publisher=John Wiley &amp;amp; Sons | publication-place=Hoboken, NJ | year=2014 | isbn=978-1-118-74531-1 | oclc=870334544 | language=da }}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web|url=https://docs.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/work-with-data-in-asp-net-core-apps|title=Work with data in ASP.NET Core Apps|website=docs.microsoft.com}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Metavariable (logic)]]&lt;br /&gt;
*[[Xyzzy (computing)|xyzzy]]&lt;br /&gt;
*[[Alice and Bob]]&lt;br /&gt;
*[[John Doe]]&lt;br /&gt;
*[[Fnord]]&lt;br /&gt;
*[[Free variables and bound variables]]&lt;br /&gt;
*[[Gadget]]&lt;br /&gt;
*&amp;#039;&amp;#039;[[Lorem ipsum]]&amp;#039;&amp;#039;&lt;br /&gt;
*[[Nonce word]]&lt;br /&gt;
*[[Placeholder name]]&lt;br /&gt;
*[[Widget (economics)|Widget]]&lt;br /&gt;
*[[The Smurfs#Language|Smurf]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*[http://www.catb.org/jargon/html/M/metasyntactic-variable.html Definition of &amp;#039;&amp;#039;metasyntactic variable&amp;#039;&amp;#039;, with examples.]&lt;br /&gt;
*[http://www.catb.org/jargon/html/C/Commonwealth-Hackish.html Examples of metasyntactic variables] used in &amp;#039;&amp;#039;[[Commonwealth of Nations|Commonwealth]] Hackish&amp;#039;&amp;#039;, such as &amp;#039;&amp;#039;wombat&amp;#039;&amp;#039;.&lt;br /&gt;
*[http://blog.codinghorror.com/variable-foo-and-other-programming-oddities/ Variable &amp;quot;foo&amp;quot; and Other Programming Oddities]&lt;br /&gt;
&lt;br /&gt;
[[Category:Placeholder names]]&lt;br /&gt;
[[Category:Metalogic]]&lt;br /&gt;
[[Category:Variable (computer science)]]&lt;br /&gt;
[[Category:Syntax (logic)]]&lt;/div&gt;</summary>
		<author><name>Djehuti</name></author>
	</entry>
</feed>