Metalanguage

In logic and linguistics, a metalanguage is a language used to make statements about other languages (object languages). Formal syntactic models for the description of grammar, e.g. generative grammar, are a type of metalanguage. More broadly, it can refer to any terminology or language used to discuss language itself—a written grammar, for example, or a discussion about language use.

An example would be rendering an utterance in logic e.g. "John smokes" can be written as S(j), where S=smokes and j=john.

Kinds
There are a variety of recognized metalanguages, including embedded, ordered, and nested ( hierarchical).

An embedded metalanguage, as its name suggests, is a language embedded in an object language. It occurs both formally and naturally. This idea is found in Douglas Hofstadter's book, Gödel, Escher, Bach, in his discussion of the relationship between formal languages and number theory: ". . .it is in the nature of any formalization of number theory that its metalanguage is embedded within it." (pg.270). It occurs in natural, or informal, languages, as well—such as in English, where adjectives, adverbs, and possessive pronouns constitute an embedded metalanguage; and where nouns, verbs, and, in some instances, adjectives and adverbs, constitute an object language. Thus, the adjective 'red' in the phrase 'red barn' is part of the embedded metalanguage of English, and the noun 'barn' is part of the object language. In the example, 'slowly running', the verb 'running' is part of the metalanguage, and the adverb 'slowly' is part of the object language.

An ordered metalanguage is analogous to ordered logic. An example of an ordered metalanguage would be the construction of one metalanguage to talk about an object language, followed by the creation of another metalanguage to talk about the first metalanguage, and so on.

A nested, or hierarchical, metalanguage is similar to an ordered metalanguage in that each level represents a greater degree of abstraction. However, a nested metalanguage differs from an ordered one, in that each level includes the one below. The paradigmatic example of a nested metalanguage comes from the Linnean taxonomic system in biology. Each level in the system incorporates the one below it. The language used to talk about genus is also used to talk about species; the language that is used to talk about orders is also used to talk about geni; and, so on, up to kingdoms.

Role in metaphor
Michael Reddy (1979) has demonstrated that much of the language we use to talk about language is conceptualized and structured by what he refers to as the conduit metaphor, which holds that ideas can be expressed and interpreted through language. It incorporates these three interconnected metaphors:
 * Concepts, thoughts, feelings, meanings, sense and ideas are objects.
 * Words, sentences, and so on are containers (with an inside and an outside) for these objects.
 * Finally, communication is the act of sending and receiving these containers (through a conduit).

Those who speak and expect their meaning to be understood as it was intended are thinking of language as a conduit, perhaps a more faithful one than it truly is: miscommunications and misunderstandings can be attributed to this assumption.

Reddy offers sentences similar to the following as evidence of the prevalence of the conduit metaphor in society:


 * 1) What is the meaning in his words?
 * 2) Try to get your thoughts into words.
 * 3) I couldn't get any meaning out of his words.
 * 4) I couldn't find any sense in his words.
 * 5) His words were empty and 'devoid' of feeling.
 * 6) His promises were hollow.
 * 7) His ideas were hidden in a dense thicket of sentences.
 * 8) Like a maggot in a turd he hid within the word.
 * 9) How do I convey my love in mere words.
 * 10) How do I get it across to you that I don't want to see you again.
 * 11) I gave her a call.
 * 12) I received your call.
 * 13) I got the message.

Reddy estimates that fully 70% of the language we use to talk about the English language is based on this metaphor. While recognizing the prominence of this metaphor, Reddy is deeply troubled by it. He thinks of it as erroneous, misleading, and dehumanizing.

Computing
Computers are not intelligent like humans and therefore do not get the gist of an idea as a person would. Computers follow programmes which are sets of instructions in a clear and simple language. The development of a programming language involves the use of a metalanguage. Backus–Naur form is one of the earliest metalanguages used in computing and was developed in the 1960s by John Backus and Peter Naur.

HTML and XHTML are examples of markup languages that can be used by anyone wishing to present Web pages on the internet with media such as text (formatted or unformatted), graphics, sound and video. Markup languages are different to metalanguages as they only describe how a document should be presented and not the syntax of a computer programming language. XML is the metalanguage used to describe to XHTML just as SGML is used to describe HTML. XHTML is much stricter than HTML, for example XHTML is case sensitive unlike HTML.

XML is used to describe other document types such as "OpenDocument Text" which is the native format for the word processor application in OpenOffice.org. Many other metalanguages have been based on the W3C XML 1.0 standard, including:
 * XQuery (An XML based Query language)
 * XLink
 * SVG
 * SMIL
 * Many more

There are in addition special markup languages for mathematical and scientific notation such as TeX and LaTeX or one of its many variants.