> This habit grew I guess because even the official docs use one-letter names. It is also quicker to type and requires less thinking to press T instead of writing a full name.
This habit grew because every language with generics uses such short generic type names and frankly, they are easier to read than MyFancyGenericTypeName.
Thanks for the rest of the article. Pretty good read.
> Disagree. Also this same logic can be applied to every other token (ie this argument suggests we should write minified code).
No, it does not. Think of the type variable as a template. The value of this kind of variable does not change during the execution of a function, once given, stays the same. When reading code with generics it does not even make sense to compare the names across two different functions unless they are methods in a class.
Basically, a T in head<T> may be something else than T in tail<T> depending on what the container declares. And what if I use your head<Element> as my head<Leaf>. For me semantically it is not an Element so your forced generic naming is simply going to mess with my brain logic. Leave my T alone. My T is my Type, not some imaginary thing the person who wrote the API imagined I should be putting in there.
> This new logic can be applied to every other constant.
Constant is by definition constant. Generic type is known and bound only in the given code path and may differ across two different executions. That's not constant.
> This habit grew I guess because even the official docs use one-letter names. It is also quicker to type and requires less thinking to press T instead of writing a full name.
This habit grew because every language with generics uses such short generic type names and frankly, they are easier to read than MyFancyGenericTypeName.
Thanks for the rest of the article. Pretty good read.