RAD Studio (Common)
ContentsIndex
PreviousUpNext
Terminology for Generics

Terminology used to describe generics is defined in this section.

Type generic  
A type declaration that requires type parameters to be supplied in order to form an actual type.
'List<Item>' is a generic in the following code:
type
List<Item> = class
...
end;  
Generic  
Same as Type generic.  
Type parameter  
A parameter declared in a generic declaration or a method header in order to use as a type for another declaration inside its generic declaration or method body. It will be bound to real type argument. Item is a type parameter in the following code:
type
List<Item> = class
...
end;  
Type argument  
A type used with type identifier in order to make an instantiated type. In List<Integer>, if List is a generic, Integer is a type argument.  
Instantiated type  
The combination of a generic with a set of parameters.  
Constructed type  
Same as instantiated type.  
Closed constructed type  
A constructed type having all its parameters resolved to actual types. List<Integer> is closed because Integer is an actual type.  
Open constructed type  
A constructed type having at least one parameter that is a type parameter. If T is a type parameter of a containing class, List<T> is an open constructed type.  
Instantiation  
The compiler generates real instruction code for methods defined in generics and real virtual method table for a closed constructed type.
This process is required before emitting a Delphi compiled unit file (.dcu) or object file (.obj) for Win32.  
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!