typevariable
nounUK /ˈtaɪp ˌveəriəbl/
US /ˈtaɪp ˌveriəbl/
A type variable is a letter or name that stands in for any kind of data in a computer program.
In the function list<T>, the letter T is a type variable that can be a number, a word, or anything else.
RELATED WORDS
OTHER MEANINGS
2. In type theory, a variable ranging over types rather than values.
The expression is typed as α → α, where α is a type variable.
3. A symbol in a programming language's type system that can be bound to different concrete types.
The compiler replaced the type variable with the actual type at compile time.
4. A placeholder used in generic programming to write code that works with many data types.
Using a type variable lets one sorting function handle both integers and strings.