Metasyntactic Variable

What Does Metasyntactic Variable Mean?

A metasyntactic variable is a type of variable used by application developers as a placeholder name or alias term. It is unlike more commonly used logical variables and may contain any symbol or word that does not violate the rules of the language, although most metasyntactic variables are nonsensical words selected for uniqueness.

Advertisements

Techopedia Explains Metasyntactic Variable

Variable name creation is challenging, especially for programmers who teach specific programming language syntax or algorithms. Metasyntactic variable naming is used a temporary solution that provides greater clarity than random letters or words.

The following are examples of common metasyntactic variables:

  • MIT/Stanford: foo, bar, baz, guux
  • CMU: foo, bar, thud, grunt
  • Python programmers: spam, ham eggs
  • Common in England: o oogle, foogle, boogle o zork, gork, bork

Of all metasyntactic variables, “foo” is the most common.

Advertisements

Related Terms

Latest Productivity Software Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…