请输入您要查询的百科知识:

 

词条 TypeParameter
释义

  1. See also

  2. External links

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

  • Metasyntactic variable
  • Generic programming

External links

  • How to Think Like a Computer Scientist, Chapter 17: Templates
{{Compu-lang-stub}}

1 : Programming constructs

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/21 2:36:20