3 ms·
I'm not sure I agree with the title, although I do agree with just about all of the content: * a string type is probably a good idea to bundle the subtleties o
by masklinn 13y ago
I'm not sure I agree with the title, although I do agree with just about all of the content:
* a string type is probably a good idea to bundle the subtleties of unicode, a plain array or list (whether it's of bytes or of codepoints) won't cut it: standard array operations are incorrect/invalid on unicode streams
* the vast majority of string types are broken anyway, as even in the best case they're codepoint arrays (possibly with a smart implementation). The bad cases are just code unit arrays, which break before you even reach fine points of unicode manipulation
And then, you've got the issue that a lot of unicode manipulation is locale-dependent, which most languages either ignore completely or fuck up (or half and half, for extra fun)