Matrioshka language

From Esolang
Jump to: navigation, search

A matrioshka language is an esoteric programming language formed by bundling one or more meta-languages with one or more language descriptions.

Matrioshka languages can be identified by their program forms, which will have multiple, distinct 'phases' with different syntactic and semantic rules. There are often two phases; the first gives a set of rules, and the second provides objects on which those rules are to be applied. There is, however, no technical restriction of two phases; each phase could define a new language description using the rules of the previous phase, indefinitely.

Thue and ODDBALL are examples of matrioshka languages. ALPACA is not, since it is only a meta-language (i.e., the initial state of the cellular automaton cannot be given.)

The term comes from the Russian word for the so-called "nesting dolls"; by analogy, a language-within-a-language. Comparable terms might be Curried language, by analogy with Curried functions (however, this term is already [ab?]used to describe languages which support Currying), or parameterized language, which already has a [more general?] formal definition.