[swift-evolution] [swift-evolution-announce] [Review] SE-0122: Use colons for subscript declarations

James Froggatt james.froggatt at me.com
Thu Jul 21 05:08:52 CDT 2016

>    * What is your evaluation of the proposal?

I think colons better represent a subscript's relationship to its type, so in favour.
This could also set the precedent for future ‘parameterised accessor’ syntax in Swift, in which case I prefer this cleaner syntax to something like ‘-> inout’.

While there are parallels to functions, as some people have noted, I think the parallel is strictly the parameter list, which will remain either way. The semantic relationship to the type, which should be conveyed by the symbol, is much closer to that of computed properties, which use a colon.

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

It's a minor pain point currently, but in the long term sets a precedent for future parameterised accessors.

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

It think this defines it, so N/A?

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

Not sure how other languages handle this. This is a decision specifically on Swift's syntax, so we should go with what makes sense for Swift.

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

I've read it through the proposal a couple of times, and wrote it once.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160721/3f547b5a/attachment.html>

More information about the swift-evolution mailing list