[swift-evolution] SE-163: String Revision: Collection Conformance, C Interop, Transcoding

David Beck davidb at acst.com
Mon Apr 10 18:01:05 CDT 2017

> Hello, Swift community!
> The review of "SE-163: String Revision: Collection Conformance, C Interop, Transcoding" begins now and runs through next Tuesday, April 11th. The proposal is available here:
> https://github.com/apple/swift-evolution/blob/master/proposals/0163-string-revision-1.md<https://github.com/apple/swift-evolution/blob/master/proposals/0163-string-revision-1.md>
> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
> https://lists.swift.org/mailman/listinfo/swift-evolution<https://lists.swift.org/mailman/listinfo/swift-evolution>
> or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:
> Proposal link: https://github.com/apple/swift-evolution/blob/master/proposals/0155-normalize-enum-case-representation.md<https://github.com/apple/swift-evolution/blob/master/proposals/0155-normalize-enum-case-representation.md>
> Reply text
> Other replies
> What goes into a review?
> The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
> • What is your evaluation of the proposal?

Looks great! Removing collection conformance from String made sense to me initially, but in practice is just an arbitrary barrier. It is just too common that you need to treat a string like a collection.

> • Is the problem being addressed significant enough to warrant a change to Swift?


> • Does this proposal fit well with the feel and direction of Swift?

Absolutely. I love that substring behavior is becoming more obvious. Before the Strings manifesto I had no idea that substrings referenced the original string. For many operations, a substring will be consumed and then discarded, so non copying is what you want. Other times, you are discarding the original and keeping the copy, in which case the language pushes you towards creating a copy, even if the programmer isn’t aware of what they are doing (I’ve seen this with collections). And, very occasionally, it makes sense to keep the subcollection around if you are also referencing the original.

This design has been proven to me to be the best of all worlds with collections.

> • If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?

> • How much effort did you put into your review? A glance, a quick reading, or an in-depth study?

a quick reading

> More information about the Swift evolution process is available at https://github.com/apple/swift-evolution/blob/master/process.md<https://github.com/apple/swift-evolution/blob/master/process.md>
> Thank you,
> John McCall
> Review Manager

David Beck
davidb at acst.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170410/26dc3035/attachment.html>

More information about the swift-evolution mailing list