Generics Glossary

Browse 11 generics terms defined in plain English, from the cultural dictionary of computing.

11 Generics Terms

Conditional Type
A type-system feature that selects one resulting type or another based on a type relationship or constraint, often used in advanced generic programming....
Covariance
A type relationship where a generic type preserves the subtyping direction of its parameter — if Cat extends Animal, then List<Cat> is assignable to...
Forall
A universal quantifier in type theory and languages like Haskell that introduces type variables scoped over a type signature, enabling parametric polymorphism....
Monomorphization
A compile-time code generation strategy — used by Rust, C++ templates, and similar languages — that creates a specialized copy of each generic function or type...
Template
A construct that allows writing code parameterized by types or values, generating specialized versions at compile time. Central to C++ generics and used...
Type Bound
A constraint on a generic type parameter that restricts it to types satisfying a specified interface, trait, or superclass — such as `<T extends...
Type Constructor
A type-level function that takes one or more type arguments and produces a concrete type — for example, `List` is a type constructor that, when applied to...
Type Erasure
The compile-time removal of generic type information so that the runtime operates on raw types. Java's approach to generics — List<String> and List<Integer>...
Type Parameter
A placeholder type variable declared in angle brackets (e.g., `<T>`) on a generic function, class, or interface that is replaced with a concrete type when the...
Utility Type
A built-in generic type in TypeScript that transforms other types — for example, Partial<T> makes all properties optional, Pick<T, K> selects a subset of...
Utility Types
Built-in generic types in TypeScript (Partial, Required, Pick, Omit, Record, etc.) that transform existing types. They reduce boilerplate by deriving new types...

Related Topics