Metalinguistic abstraction
In computer science, metalinguistic abstraction is the process of solving complex problems by creating a new language or vocabulary to better understand the problem space. It is a recurring theme in the seminal MIT textbook, the Structure and Interpretation of Computer Programs, which uses Scheme as a framework for constructing new languages.
Explanation
For example, consider modelling an airport inside a computer. A procedural (e.g. C) programmer would create data structures to represent the elements of an airport and procedures or routines to operate on those data structures. An object-oriented (e.g. C++) programmer would create objects to represent the elements of the airport with methods which represent their behaviors. A functional (e.g. Scheme) programmer would create higher-order functions representing both the elements and behaviors of the airport. A metalinguistic programmer would abstract the problem by creating new, embedded domain specific languages for modelling an airport, with peculiar primitives and types for doing so naturalistically. The language could then encompass any or all of the above techniques as required by the problem at hand.[1]
Because the creation of functional metalinguistic abstractions in non-functional languages can be cumbersome while the reverse is usually trivial, and also because of the syntactic flexibility and referential safety of functional macros, metalinguistic programming is mostly idiomatic of functional programming languages.
See also
References
- Structure and Interpretation of Computer Programs, Part 4 — Metalinguistic Abstraction