Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> On the contrary, the article calls code point indexing “rather useless” in the subtitle.

No it doesn't. It says it's "rather useless" that len(str) returns the number of code points, because there's rarely a reason to store the count of code points as the string length. By contrast, storing the number of native code units is useful for storage allocation and concatenation, which are common operations.

Code point indexing is still very useful, depending on context. For example, a majority of Korean speakers (~50 million Internet users) prefer deletion by Jaso unit. Korean EGCs are whole syllables, and making someone retype a whole syllable to change one character is bad UX.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: