Skip to main content

etymology - What is the history of the term "metasyntactic variable"?


Background


A metasyntactic variable is a word or term that stands in for something else, typically used when you're describing an overall pattern, and the subject under discussion could have any name in actual practice. A placeholder.


It's most commonly used in computer science and related fields, and in that community foo is the most commonly used and recognized metasyntactic variable.


Example


The classic example from the C2 Wiki:



Suppose I have a list, foo, with a node, bar, ...



What this allows us to do is now refer to the list as "foo" and and the node as "bar", as in "now, if bar is the last node in foo...", while recognizing that in a program the real "foo" and "bar" could have any name at all.


Origins


But here, I'm not asking about "foo" or "bar"¹ or any specific metasyntactic variable, I'm asking about the term metasyntactic variable.


A recent answer on a different question suggested the author Terry Pratchett could have invented it:



Terry Pratchett .. used the idea of a 'Metasyntactic variable' (his own nomenclature I believe but open to correction).



Pratchett didn't invent the term, but the answer prompted me to look into who did, and I'm stumped.


So:



  1. When was the term metasyntactic variable first used, or metasyntactic modifying some other word, giving the same meaning?

  2. Why meta-syntactic?

  3. Was there any specific event or author who popularized it, or was its growth simply organic?

  4. Is the term used with the same meaning in any interesting ways outside of the software world (like the Terry Pratchett example)?


Early uses


Using Google Books and Google nGrams², the earliest use of the full term metasyntactic variable I could find was the 1979 work The MDL Programming Language, which reads, on page 4:



A metasyntactic variable -- something to be replaced in actual use by something else -- appears as a radix:fix, in an italic font; often the variable will have both a meaning and a data type (as here), but sometimes those will be omitted, for obvious reasons.



and on page 44:



TYPE (aren't homonyms wonderful?), just type the appropriate ATOM, like FIX or FLOAT or ATOM etc. However, in this document we will use the convention that a metasyntactic variable can have a type for a "data type": for example, foo:type means that the TYPE of foo is ATOM, but the ATOM must be something that the SUBR TYPE can return.



These paragraphs suggest, respectively, that (a) the term is new enough that it has to be defined (a 1990 Emacs Lisp manual uses the word unselfconsicously and without any definition, because by then everyone knew what it meant), and (b) that it's established enough that the authors have to defend their novel convention that m.v.s may have data types (which is atypical).


Which means this may be an early use, but not the first use.


So, broadening my search, and looking for only metasyntactic, I found ALGOL-Bulletin no. 13, published August 1961, mentioning a memo written in November 1960 which used that word:


Serial no. 10. From Peter Zilahy Ingerman and Kirk Sattley. 7.11.60. <br/> Subject: Proposed symbols for use in ALGOL translators. <br/> The authors give a list of letter combinations, corresponding to all basic symbols and **metasyntactic classes** of ALGOL 60, for use in describing ALGOL translators.


But it's not clear whether this metasyntactic had the same sense as it does in the full term metasyntactic variable, as the word "classes" suggest this might be a more specific and technical term of art in ALGOL's design, or computer language design more broadly.


"Meta" syntactic


Aside from its first use, I'm interested in why the term "metasyntactic" was chosen in the first place. What is "meta" about these terms' relationship to syntax?


The canonical source on this, The Jargon File, presents three different concepts (list-ified for clarity):



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”).
3. However, it has been plausibly suggested that the real reason for the term “metasyntactic variable” is that it sounds good.



In addition, I've personally made the argument that their meta-syntacticness arises from the fact that the same words can be used to stand in for any part of speech.


In any case, while (1) or some version of it is probably the first idea that would come to most people's minds, the fact that the Jargon File didn't stop there is telling, and I think finding the origins of the term will shed a lot of light here.


Non-software uses or origins


The Terry Pratchett answer above also got me thinking: do non-computer scientists use the term metasyntactic variable, in a non-software context? Are there people who use this term non-ironically, who are not familiar with its software sense?


I would be particularly interested in answers which show the term pre-dates its use in software. Given that "syntax" is really only studied by one other group, I wonder do linguists or syntacticians of natural languages³ use this term at all? Did they do so before, say, 1950?




¹ Interestingly, foo and bar have their own, detailed etymology, and no, it's not as straightforward as "arising from the WWII acronym FUBAR". See RFC 3092 and the canonical post about foo here on EL&U.


² I actually was forced to use only Google Books for the full term; for some reason, metasyntactic variable doesn't show up in nGram Viewer at all.


³ I once made the case that words like "thingy", "doodad", "whatshisface", etc are "metasyntactic variables", but John Lawler says they're more properly termed "nonce forms" by linguists.


PS: I know I've picked the low-hanging fruit here, with Google Books and Google nGram Viewer, but I would really still prefer scholastic, detailed answers. Speculation will just add noise. Though I'm also happy to accept first-hand accounts from people who lived through the 50s-60s-70s computer era (or very credible second-hand accounts).




Comments

Popular posts from this blog

Is there a word/phrase for "unperformant"?

As a software engineer, I need to sometimes describe a piece of code as something that lacks performance or was not written with performance in mind. Example: This kind of coding style leads to unmaintainable and unperformant code. Based on my Google searches, this isn't a real word. What is the correct way to describe this? EDIT My usage of "performance" here is in regard to speed and efficiency. For example, the better the performance of code the faster the application runs. My question and example target the negative definition, which is in reference to preventing inefficient coding practices. Answer This kind of coding style leads to unmaintainable and unperformant code. In my opinion, reads more easily as: This coding style leads to unmaintainable and poorly performing code. The key to well-written documentation and reports lies in ease of understanding. Adding poorly understood words such as performant decreases that ease. In addressing the use of such a poorly ...

Is 'efficate' a word in English?

I routinely hear the word "efficate" being used. For example, "The most powerful way to efficate a change in the system is to participate." I do not find entries for this word in common English dictionaries, but I do not have an unabridged dictionary. I have checked the OED (I'm not sure if it is considered unabridged), and it has no entry for "efficate". It does have an entry for "efficiate", which is used in the same way. Wordnik has an entry for "efficate" with over 1800 hits, thus providing some evidence for the frequency of use. I personally like the word and find the meaning very clear and obvious when others use it. If it's not currently an "officially documented" word, perhaps its continued use will result in it being better documented.