Hacker News new | ask | show | jobs
by pwdisswordfish4 2099 days ago
Why does it sound wrong? Since strings are UTF-8, this just boils down to lexicographical ordering of code points.

Ironically though, that should be actually more objectionable than ordering arrays by lexicographical order of elements, because the underlying code point order is pretty much useless for any other purpose than having some arbitrary deterministic order. Meaningfully ordering strings is an inherently locale-dependent operation, and PartialOrd has no way to take this into account.