[swift-evolution] [Review] SE-0172: One-sided Ranges

Gwendal Roué gwendal.roue at gmail.com
Wed Apr 19 10:23:51 CDT 2017


> 	• What is your evaluation of the proposal?

+0.75

"RangeExpression" is an unexpected name. I was expecting "RangeProtocol", as in IteratorProtocol and LazySequenceProtocol.

We need a consistent suffix for protocols that can't be named in -able,  -ible, or named with a simple noun because the noun is already used by a concrete type. "-Protocol" should be that prefix: RangeProtocol.

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

Yes. Anyone who has written `s[s.startIndex..<i]` knows that something was wrong.

People who claim that s[..<i] or s[i...] are not legible have a demi-point: I predict that all online tutorials about String will rush on those fancy new operators, and they will percolate in the Swift culture very quickly.

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

Yes. That's a very good use of Swift operators.

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

I love how negative indexes are used in Ruby and Python. I know that this can't apply to Swift because not all indexes are integers. This proposal addresses several use cases provided by those negative indexes.

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

I did evaluate the name of RangeExpression, but not its design.

Thanks for this proposal,
Gwendal Roué


> Le 18 avr. 2017 à 06:40, Douglas Gregor via swift-evolution <swift-evolution at swift.org> a écrit :
> 
> Hello Swift community,
> 
> The review of SE-0172 "One-sided Ranges" begins now and runs through April 23, 2017. The proposal is available here:
> 
> https://github.com/apple/swift-evolution/blob/master/proposals/0172-one-sided-ranges.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
> 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/0172-one-sided-ranges.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?
> 	• 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?
> 	• 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?
> More information about the Swift evolution process is available at
> 
> https://github.com/apple/swift-evolution/blob/master/process.md
> Thank you,
> 
> -Doug
> 
> Review Manager
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list