[swift-evolution] Strings in Swift 4
Ben Cohen
ben_cohen at apple.com
Fri Jan 20 09:35:44 CST 2017
> On Jan 19, 2017, at 10:42 PM, Jose Cheyo Jimenez <cheyo at masters3d.com> wrote:
>
> I just have one concern about the slice of a string being called Substring. Why not StringSlice? The word substring can mean so many things, specially in cocoa.
This idea has a lot of merit, as does the option of not giving them a top-level name at all e.g. they could be String.Slice or String.SubSequence. It would underscore that they really aren’t meant to be used except as the result of a slicing operation or to efficiently pass a slice. OTOH, Substring is a term of art so can help with clarity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170120/3a745332/attachment.html>
More information about the swift-evolution
mailing list