Jump to content

TypeParameter

From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by Hamsooper (talk | contribs) at 02:43, 3 November 2020 (Fixed typo). The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer programming languages, TypeParameter is a generic label used in generic programming to reference an unknown data type, data structure, or class. TypeParameter is most frequently used in C++ templates and Java generics . TypeParameter is similar to a metasyntactic variable (e.g., foo and bar), but distinct. It is not the name of a generic type variable, but the name of a generic type of variable.

The capitalisation varies according to programming language and programmer preference. TypeParameter, Typeparameter, TYPEPARAMETER, typeparameter, and type_parameter are all possible. Alternate labels are also used, especially in complex templates where more than one type parameter is necessary. X, Y, Foo, Bar, Item, Thing are typical alternate labels. Many programming languages are case-sensitive, making a consistent choice of labels important. The CamelCase TypeParameter is one of the most commonly used.

See also

[edit]
[edit]