Grapheme clusters? More like grapheme clusterfucks!
Nah, seriously.
Check out this sentence:
My sister is a scientist 👩🏽🔬
Let's assume you have a system where you can work with strings as raw code points. UTF-32. We're side-stepping the whole deal with UTF-8 and UTF-16 here, and ignoring byte order. It's handled by the system we're working with.
What do you suppose happens if you reverse the above?
🔬🏽👩 tsitneics a si retsis yM
What the hell, right? Grapheme clusters!
With a case like "åe" reversing to "e̊a", you might say "normalize it first to get rid of the combining ring above, then reverse it". But that won't work on zalgo, and it certainly won't work on these goddamn emoji.
(full disclosure: I have no sister and everyone in my family is white as hell.)
The system I assumed here works in raw code points. Not in grapheme clusters. So while you see a single brown female scientist, the system sees four things: a woman, a Fitzpatrick modifier, a joiner, and a microscope. You see a lowercase a with a ring above and a lowercase e, but the system sees a lowercase a followed by a combining ring above and a lowercase e.
And you know what?
Hot take perhaps but any programming language that can work with grapheme clusters (iterate, iterate backwards, reverse, stuff like that) is trying to fucking hard.
Also, any language that somehow knows to keep the presence or absence of the dot on an i is a tryhard. Fite me.













