Generics are templates for generating classes. It is a concept that comes from C++, where it is deeply integrated in the language. As of version 2.2, Free Pascal also officially has support for templates or Generics. They are implemented as a kind of macro which is stored in the unit files that the compiler generates, and which is replayed as soon as a generic class is specialized.
Currently, only generic classes can be defined. Later, support for generic records, functions and arrays may be introduced.
Creating and using generics is a 2-phase process.