[swift-evolution] [swift-evolution-announce] [Review] SE-0148 Generic Subscripts

Howard Lovatt howard.lovatt at gmail.com
Thu Jan 19 18:05:06 CST 2017


https://github.com/apple/swift-evolution/blob/master/proposals/0148-generic-subscripts.md

> What is your evaluation of the proposal?
Well written proposal. 

Would suggest that you add some more examples from the discussions on the mailing list, particularly the Brent-Royal TypedDictionary example. 

+1 overall.

> Is the problem being addressed significant enough to warrant a change to Swift?
Yes, it has caused me to write code that uses functions rather than subscripts that aren't 'natural' in Swift. 

> Does this proposal fit well with the feel and direction of Swift?
Yes brings subscripts more into line with functions. Could go further and include throws as well, another issue I have had!

> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
Yes. Scala has generic subscripting. In Scala a read subscript calls the `apply` method and a write subscript calls the `update` method. Both `apply` and `update` can have generic arguments, can throw etc, and they do not need to have the same argument types (they are seperate methods). Generic subscripting works well in Scala but is not widely used, the vast majority of the time current Swift like subscripting is used (except that throwing is used for index out of bounds rather than terminating the program).

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

Read the evolution thread and the proposal. Have encountered this limitation in my own code. 

-- Howard.

> On 20 Jan 2017, at 8:39 am, Douglas Gregor <dgregor at apple.com> wrote:
> 
> Hello Swift community,
> 
> The review of SE-0148 “Generic Subscripts" begins now and runs through January 24, 2017. The proposal is available here:
> 
> https://github.com/apple/swift-evolution/blob/master/proposals/0148-generic-subscripts.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/0148-generic-subscripts.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-announce mailing list
> swift-evolution-announce at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution-announce
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170120/3355dbbd/attachment.html>


More information about the swift-evolution mailing list