Re:A string of unexpected lengths
by thomasballinger on Saturday February 21, 2015 @12:51PM
(#9086195)
How do you find this in practice? I mention this in the 3rd footnote of the post, but didn't have much to say about it because I haven't used it myself. The one person I've talked about this says it's rather awkward right now because Swift doesn't provide great tools for working with these objects.
Re:A string of unexpected lengths
by TheLoneWolfling on Saturday February 21, 2015 @11:15AM
(#9085860)
So does Swift use a rope? Or is getting the Nth character of a string O(n) time?
Using extended grapheme clusters as characters means truncation, concatenation, length measurement and transformations like reversal all work in the expected way, even in the presence of combining characters. More standard libraries should consider adopting this model!