<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 30 Mar 2017, at 21:39, Robert Bennett via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Adrian,<br class=""><br class="">I think there are a few competing claims here.<br class=""><br class="">1) Substring is a term of art used universally throughout computing, and camel-casing it would run counter to that.<br class="">2) While subsequence is a word, its precise mathematical meaning differs from what it means in Swift. In Swift a SubSequence contains consecutive elements of a sequence, whereas in math a subsequence may contain any subset of the elements, ordered correctly. Hence Subsequence would be technically incorrect (not a big issue IMO).<br class="">3) We want Sub[sS]tring and Sub[sS]equence to have the same capitalization.<br class=""><br class="">I'd prefer ignoring 2 and satisfying 1 and 3, since there's no reason Swift's names must exactly coincide with mathematical objects with the same name (for instance, mathematical sets may contain anything at all, including themselves). In addition, the prefix "Sub" does not usually (ever?) produce a Sequence with wholly different mechanics, as do "Enumeration", "Zip2", etc. -- the Subsequence really belongs to the owning Sequence. So my vote is for Substring and Subsequence.<br class=""><br class="">As for why not StringSlice... Substring is certainly a more familiar word. That said, StringSlice would make it clearer that the slice is a view into a String and is meant for temporary use only, which Substring might not convey. If we choose StringSlice, I see no reason to change SubSequence to Subsequence.<br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""><div class="">+ 1 to StringSlice. In fact, I’m not sure if we even need Substring/StringSlice at all. We already have a Slice type.</div><div class=""><br class=""></div><div class="">The proposal mentions the parallel to ArraySlice, but ArraySlice is set to go: <a href="https://bugs.swift.org/browse/SR-3631" class="">https://bugs.swift.org/browse/SR-3631</a></div><div class=""><br class=""></div><div class="">So, running with the parallel, why not add a conditional conformance: "<font face="Courier" class="">Slice: Unicode where Base: Unicode</font>”?</div><div class=""><br class=""></div><div class="">- Karl</div></body></html>