[swift-evolution] Strings in Swift 4
davesweeris at mac.com
Thu Jan 19 21:38:12 CST 2017
> On Jan 19, 2017, at 20:56, Ben Cohen via swift-evolution <swift-evolution at swift.org> wrote:
> Hi all,
> Below is our take on a design manifesto for Strings in Swift 4 and beyond.
> Probably best read in rendered markdown on GitHub:
> We’re eager to hear everyone’s thoughts.
> Ben and Dave
Regarding substrings... Instead of having separate `ArraySlice` and `Substring` types, what about having just one type, `Slice<T: Sequence>`, for anything which shares memory? Seems like it'd be easier for users who'd only have to worry about shared storage for one type, and for stdlib authors who'd only have to write it once.
Of course, that assumes it actually would be easier to only have to write/maintain one such "shared memory" type... If that's not the case, I'm not sure the smaller API surface is worth it.
Anyway, I haven't finished reading through it all yet, but I like what I've seen so far.
- Dave Sweeris
More information about the swift-evolution