[swift-evolution] [swift-evolution-announce] [Review] SE-0164: Remove final support in protocol extensions

Howard Lovatt howard.lovatt at gmail.com
Wed Apr 5 18:15:19 CDT 2017


The review of SE-0164 "Remove final support in protocol extensions"

> What is your evaluation of the proposal?
The present situation isn't great. People get confused about which method will called with protocol extensions. Seems like every week there is a variation on this confusion on Swift Users mailing list. Therefore something needs to be done. 

However I am not keen on this proposal since it makes behaviour inconsistent between methods in protocol extensions, classes, and structs. 

I think a better solution would be one of the following alternatives:

  1. Must use final and final means it cannot be overridden; or
  2. If not final dispatches using a table like a class and if marked final cannot be overridden and if marked dynamic uses obj-c dispatching; or
  3. Must be marked dynamic and uses obj-c dispatching. 

My preference would be option 2 but I think any of the three is superior to the present situation or the proposal. 

> Is the problem being addressed significant enough to warrant a change to Swift?
Yes. Causes no end of confusion and is inconsistent. 

> Does this proposal fit well with the feel and direction of Swift?
Fixing the current behaviour yes, but not the proposal since it is inconsistent with the rest of the language. 

> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
Yes. Languages like Java and Scala use a method similar to option 2 above. But not something like the proposal. 

> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
Have suffered at the hands of the present behaviour when learning Swift. 

-- Howard. 

> On 6 Apr 2017, at 8:05 am, Douglas Gregor <dgregor at apple.com> wrote:
> 
> Hello Swift community,
> 
> The review of SE-0164 "Remove final support in protocol extensions" begins now and runs through April 8, 2017. The proposal is available here:
> 
> https://github.com/apple/swift-evolution/blob/master/proposals/0164-remove-final-support-in-protocol-extensions.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/0164-remove-final-support-in-protocol-extensions.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/20170406/36de356c/attachment.html>


More information about the swift-evolution mailing list