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

etymology - Origin of the greeting "Sweet dreams".

Does anybody know the etymology of the phrase "sweet dreams"? I tried googling but did not find anything satisfying. Is this a relatively new phrase of the modern world or has this been in use for some time? I think it's the latter one. Answer The OED has the interjection as "a farewell to someone going to bed" from the 20th century: 1908 Sears Roebuck Catal. 198/1 Tenor Solos..Good Bye, Sweet Dreams, Good Bye. But it goes back until at least the 19th and possibly 18th centuries. John Wolcot, writing under the pseudonym of Peter Pindar, used it in his poem "Orson and Ellen; A Legendary Tale" published in 1801: Also from 1801 in The infernal Quixote (Page 287) by Charles Lucas: In the March 1776 of The Universal Magazine was published "The Serenade. A Pastoral Tale. From the German of Gesner" , where the shepherd Daphnis watches over his beloved as she sleeps and sings: The same tale appears in 1776's as Idyl XI, " Daphnis ...

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 ...

What are the similarities between the relationships of the characters in The Outsiders and Romeo and Juliet?

At first glance, it might appear as if the characters in  The Outsiders  by S. E. Hinton and  Romeo and Juliet  by William Shakespeare do not have much in common; however, when one isolates the core of the conflicts, it becomes clear that the relationships in both stories are rooted in rivalry and secrecy.  In both  The Outsiders  and  Romeo and Juliet , an overarching theme is rivalry. While   socioeconomic status separates the greasers from the Socs in The Outsiders , last names separates the Montagues from the Capulets, who appear to be relatively equal in terms of socioeconomic status. Due to these rivalries, there are instances of deadly interactions in both stories. In  The Outsiders , Johnny kills Bob (whether his actions were justified or not is debatable). In  Romeo and Juliet , Romeo kills Tybalt and Paris, and Tybalt kills Mercutio. These deaths have profound effects on the main characters. In Ponyboy's case, the Johnny's death and other events in the novel inspire h...