|
|
|
|
|
by broadwaylamb
1327 days ago
|
|
I think there's a misconception that types are meant to tag things according to the programmer's mental taxonomy. They're not. Types should be based on significant distinctions in how your particular program treats and processes the data. For instance, you don't need an EmailAddress type because your program doesn't do anything special with the knowledge that this string is actually an email address. It just treats it like another string. It takes some judgment to determine this, but I consider that part of the learning curve in using types rather than an inherent tradeoff from the tool itself. |
|