3 ms·
I believe I understand his point, I just think he overstated his case. Consider the two forms of the following argument against UTF-32/UCS-4: A: Although reaso
by torstenvl 4y ago
I believe I understand his point, I just think he overstated his case. Consider the two forms of the following argument against UTF-32/UCS-4:
A: Although reasoning about code points is more complex when dealing with UTF-8, the complexity can usually be remedied by an inner loop to iterate between code units, which is very simple in UTF-8, as (ch & 0b11000000) || !(ch & 0b10000000) being true will indicate the first byte of a code point. For this reason, the downside is limited and the upside - not having to convert to/from UTF-8, the most common encoding for Unicode text at rest - is significant.
B: There is no downside to working in UTF-8. If you find it easier to reason about UTF-32/UCS-4, you're just wrong. There's no virtue whatsoever in doing it that way.
Manish seems to be arguing B, and I simply can't agree. A strikes me as true enough without having to exaggerate like that.