I don’t recall hearing of the words “reify” or “reification” in my OOP years, but that may be because I studied aerospace engineering in college, not computer science. Since learning functional programming (FP) I often see those words, so I thought I’d try to understand their meaning.
Background
I ran into the word “reify” when I saw code like this:
trait Foo { //... } object Foo extends Foo
I’d see code like that then someone would describe that last line as a “reification” process.
What “reify” means
The short answer is that the main definition of reify seems to be:
“Taking an abstract concept and making it concrete.”
For the longer answer, I found the following definitions and examples of reification.
This SO Haskell page offers these definitions:
- Taking an abstract concept and making it concrete.
- Reification is a form of instantiation. When you reify a concept, you take something abstract and make it concrete.
- You can reify Hoare's idea of
quicksort
into an implementation in the programming language of your choice. In this vein, I spend a lot of time reifying concepts from category theory into Haskell code.
The Haskell wiki offers this definition:
- To “reify” something is to take something that is abstract and regard it as material. A classic example is the way that the ancients took abstract concepts (e.g. “victory”) and turned them into deities (e.g. Nike, the Greek goddess of victory).
Finally, this SO C# page provides more of the same definitions:
- Reification is the process of taking an abstract thing and creating a concrete thing.
- The term reification in C# generics refers to the process by which a generic type definition and one or more generic type arguments (the abstract thing) are combined to create a new generic type (the concrete thing).
- To phrase it differently, it is the process of taking the definition of
List<T>
andint
and producing a concreteList<int>
type.