3 ms·
Strings are a primitive type. Names are not strings in the same way Dates are not strings. They can be implemented, represented, and printed as strings, but th
by cratermoon 3y ago
Strings are a primitive type. Names are not strings in the same way Dates are not strings. They can be implemented, represented, and printed as strings, but they have behaviors and meaning that the primitive string type does not.
To use another example, a binary tree is not an array, although it can be implemented using an array.
Money is not a floating point value, and woe to the programmer that tries to use float for money.
- mcpackieh 3y agoThere are international standards for representing dates, but none exist for names. Names do not abide by any scheme or set of rules, therefore the only appropriate data structure for storing names is a unicode string. Anything else will exclude people.
- cratermoon 3y agoPoint me to the international standards for representing money.
- Shadowmist 3y agoISO 4217
- cratermoon 3y agoTIL
- esafak 3y agoWithout making assumptions about the origin of the name, you can't impute any structure onto that string, can you? In that case, it is still simply a string.
- cratermoon 3y ago> making assumptions We have i18n to give context, no assumptions needed.