3 ms·
The problem with what Python used to have is that the encoding wasn’t fixed. I’ll agree with you that strings-are-sequences-of-bytes is bad. That’s painful com
by chrismorgan 3y ago
The problem with what Python used to have is that the encoding wasn’t fixed.
I’ll agree with you that strings-are-sequences-of-bytes is bad. That’s painful compiler-flag, codepage, &c. territory.
But what’s not bad is strings-are-sequences-of-code-units. That’s what Rust has, for example. Rust strings aren’t sequences of bytes, but of UTF-8 code units, and the two are semantically very different.