mercredi 4 mars 2015

Origin of naming generic types as T?


I've noticed that most people use the name T for generic types, instead of any other names. What's the origin of this convention?


And.. why T (for type)? why not TYPE or Variable or any other name? If I (usually) have to name things with meaningful names, isn't naming a generic type with T breaking this rule? For instance,



class Something <CatType extends Cat> //to me, this line is more self-explanatory than
class Something <T extends Cat> //this line




Aucun commentaire:

Enregistrer un commentaire