3 ms·
My take: user names are not strings, though they may be represented as strings. As such, a type, e.g. Username, would provide a constrained and consistent range
by cratermoon 2y ago
My take: user names are not strings, though they may be represented as strings. As such, a type, e.g. Username, would provide a constrained and consistent range of allowed values, much as a type like float32 allows (within IEEE 754 rules).
It's time for programmers to stop treating everything that can be represented by a string as anything representable by a string type.