Naming Type Generics

Tags
typescriptprogrammingrant
Date Created
May 17, 2022 5:18 AM
Last Edit
May 17, 2022 5:25 AM
Discussion

Programmers harp about the importance of naming variables in easy to understand ways but then name their generic types names like T . Please help mere mortals like me who have trouble understanding complex type errors, and give these types meaningful names! Names really help with understanding the context of the code and is a lot quicker to write than thorough documentation. And if you want to denote that a generic in fact is a type, sure, prefix it with T . But please don’t stop there!