I would also like to understand the perceived problem for first time
programmers. To me first time programmers would be working with string
literals ("hello world"), string literals with values in them ("Hello
/(name)"), doing basic string concat, using higher level API of string to
do and find things in a string, etc..

I think indexing into a string is actually a complex programming task and
usually is the last thing you want to be doing outside specific problem
domains.

On Wed, Aug 17, 2016 at 12:38 PM William Sumner via swift-evolution <
swift-evolution@swift.org> wrote:

>
> > On Aug 17, 2016, at 10:40 AM, Kenny Leung via swift-evolution <
> swift-evolution@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.
>
> Preston
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to