@brendaneich In JavaScript, the following creates an array of four items because the sailboat has a variation selector, forming (I think) a grapheme cluster. Can this behavior be made more intuitive?
[...

].length === 4 //true
-
-
You’re right that we could’ve chosen something else than “iterate over code points” back then — but iterating over grapheme clusters (cfr. Intl.Segmenter) is locale-dependent, and thus not a great fit for a general-purpose mechanism in the language.
-
What is the status of Intl.Segmenter? I don't see it in Node 10.16.3, for example. Thanks.
- 9 more replies
New conversation -
-
-
But does not iterate over sailboats :-(.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.