Generics

Generics have been on the wish list since the beginning of CrossTalk. We have repeatedly revisited this issue and have always concluded that it is not feasible or practical without a major development effort.

While this is not an exact description – Delphi generics are mostly handled at compile time, while .NET generics are more run time. This creates large differences in their capabilities especially when working with simple types in generics.

Generic support also varies significantly in various Delphi versions and would require CrossTalk to drop support for older Delphi compilers.

Finally, full use of generics requires support for reflection (RTTI in Delphi). Delphi and .NET differ significantly in these areas as well and extensive code would be required to perform the necessary translations.

While there are ways including flattening of generic classes, we end up with a problem of either a very complex implementation which would extend to you the end user, or one that is severely limited in its usage.

To use a library that uses generics, you can easily and quickly write a wrapper shim.