[swift-evolution] InternalString class for easy String manipulation

William Sumner prestonsumner at me.com
Wed Aug 17 14:38:18 CDT 2016

> On Aug 17, 2016, at 10:40 AM, Kenny Leung via swift-evolution <swift-evolution at swift.org> wrote:
> I understand that the most friendly approach may not be the most efficient, but that’s not what I’m pushing for. I’m pushing for "does the thing people would most commonly expect”. Take a first-time programmer who reads any (human) language, and that is what they would expect.
> Why couldn’t String’s internal storage format be glyph-based? If I were, say, writing a text editor, it would certainly be the easiest and most efficient format to work in.
> -Kenny

Can you be more specific about the improvements you’d like to see? Based on an earlier message, you want to be able to use subscripting on strings to retrieve visual glyphs, but you can do this now via the .characters property, which presents a view of the string’s contents as a collection of extended grapheme clusters.


More information about the swift-evolution mailing list