Overview - ISO/IEC TR 25438:2006 (Common Generics for CLI)
ISO/IEC TR 25438:2006 is a Technical Report for the Common Language Infrastructure (CLI) that proposes a set of common generic types to improve language inter‑operation on CLI platforms. The report identifies gaps in the CLI standard libraries (ISO/IEC 23271) where many simple, widely used generic types are missing and provides a standardized collection - including tuples, function/action delegates, optional and either types, and a Unit filler type. The collection is experimental and accompanied by a reference C# implementation (CommonGenericsLibrary.cs) and binaries (see http://kahu.zoot.net.nz/ecma).
Key topics and technical content
- Generic tuples (product types)
- Standard generic tuple types are specified for sizes 2 through 10 to provide consistent product-type representations across languages.
- Function and procedure delegates
- Standard generic delegate types for functions (returning a value) and actions/procedures (no return value) are defined (e.g., System.Function, System.Action family).
- Optional type
- A generic System.Optional structure that represents presence/absence of a value - distinct from System.Nullable - with comparison, conversion and helper methods.
- Either type
- A System.Either structure that holds a value of one of two possible types and indicates which is present.
- Unit (filler) type
- A one-value type (Unit) intended for use where a generic parameter must exist but no meaningful value is required.
- Utility types and helpers
- Delegate conversion utilities (DelegateCast), tuple operations, equality/hashcode semantics and other method-level specifications are included to ensure consistent behavior.
Practical applications and who should use it
- Language designers and implementers targeting the CLI (for example, languages hosted on .NET/CLI) can adopt these standard generics to avoid re‑implementing basic generic types and improve cross-language interoperability.
- Library authors can rely on a common set of generic primitives (tuples, Optionals, Eithers, delegates) to provide predictable APIs for consumers across multiple languages.
- Runtime and tooling developers (compilers, code analyzers, interop tools) benefit from standard semantics for delegates, equality, hashing and conversions.
- Teams modernizing APIs will find the optional/either patterns useful for clearer null/absence handling and error/result modeling.
Related standards
- ISO/IEC 23271 - Common Language Infrastructure (main CLI standard) - TR 25438 proposes extensions to the CLI library set.
- Ecma TR/89 - Original Ecma proposal (TR/89) from which this Technical Report was prepared.
This Technical Report improves generic programming support in the CLI by standardizing small, commonly reused generic types that facilitate higher‑order programming and language inter‑operation.