3 ms·
This list is great, but what I find missing in these discussions is what to do about it. And the answer is: if at all possible, only use a name for display pur
by stouset 3y ago
This list is great, but what I find missing in these discussions is what to do about it.
And the answer is: if at all possible, only use a name for display purposes. Use a username, a UUID, or some other appropriate unique identifier that you can control the semantics of for absolutely anything for which you might need to assume any property whatsoever.
If you can avoid having a name, don’t even try to collect one. If you need one, it should be a single freeform text input accepting an arbitrary-length and arbitrary-content UTF-8 string. Persist that string exactly as you receive it. Perform no operation on that string other than rendering it.
That isn’t perfect but it’s as close as any of us can reasonably get as things stand today.
- 998244353 3y agoI like to add a 41th rule to this list: "There exists a right way to handle names that does not make any incorrect assumptions." That, unfortunately, isn't always possible. Sorting a list of people by their names alphabetically is a fairly reasonable thing to ask and in many places, it is expected that names will be sorted the surname, whether or not it appears first. This by itself requires breaking rules 18 and 20, but we may not be able to opt not to do it. The hard problem is not what to do in the ideal case: the hard problem is figuring out how to handle names in a way that minimizes friction if requirements force us to make some such assumptions.
- NovemberWhiskey 3y agoIt's fundamentally impossible to sort lists of people from different cultures, because collation differs. Say you have the last-names 佐藤 (SATO) and 中村 (NAKAMURA). In Japanese, collation is based on the kana sounds, so 佐藤 -> さ (SA) and 中村 -> な (NA). But the 五十音 (gojuon) ordering of the kana has さ before な, so 佐藤 should be before 中村. Good luck attempting to do a culturally-neutral ordering of 佐藤, 中村, SALMON and NABARRO - someone is going to be confused.