具体化
Reification is a form of instantiation. When you reify a concept, you take something abstract and make it concrete, just like the dictionary definition you provided.
You might choose to reify a type as a term inhabiting some abstract syntax tree of possible types.
You might reify a design pattern by coming up with a general purpose implementation of it for some language. For instance, something like
template<typename T> class Singleton {
public:
static T& Instance() {
static T me;
return me;
}
protected:
virtual ~Singleton() {};
Singleton() {};
}
reifies the singleton design pattern as a template in C++.
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.
You can reify a language as an interpreter for that language. Larry Wall's idea of Perl the language is reified as the perl interpreter.
data-reifyおよびvacuumパッケージは、用語を共有してメモリ内でどのように構造化されているかを表すグラフとして具現化します。
反射
具体化の反対側はリフレクションであり、具体的なものを取り、通常は詳細を忘れることによって抽象化を生成します。おそらく、抽象化がより単純であるか、または話していることの本質を何らかの形で捉えているため、これを行いたいと思うでしょう。
Java、C# などの型システム リフレクションは、プログラミング言語の具体的なクラスを取り、クラスの抽象構造を提供して、クラスが提供するメンバーのリストにアクセスできるようにします。ここでは、型の具体的な概念を取り、特定の値を破棄しながら、その構造を説明する抽象用語をそこから生成しています。
プログラミング言語を実装に具体化する方法と同様に、逆の方向に進む場合もあります。これは一般的に悪い考えと考えられていますが、実装を取り、その動作の望ましい特性から言語仕様を反映しようとするかもしれません。TeX は、Knuth によって最初に実装されましたが、仕様はありません。TeX のすべての仕様は、Knuth の実装から反映されています。
(より形式的には、具体的な領域から抽象的な領域へと移動する忘却関手としてリフレクションを考える場合、具体化は、理想的には、リフレクションの随伴性のままにされます。)
私が維持しているリフレクションパッケージは、用語を受け取り、それを表す型を生成する reify メソッドと、新しい用語を生成できる Reflect メソッドを提供します。ここで、「具体的な」ドメインは型システムであり、抽象的なドメインは用語です。