[swift-evolution] [Review #3] SE-0117: Allow distinguishing between public access and public overridability
rodney.brown6 at icloud.com
Thu Jul 21 18:36:59 CDT 2016
Proposal Link: https://github.com/apple/swift-evolution/blob/master/proposals/0117-non-public-subclassable-by-default.md
- What is your evaluation of the proposal?
+1 to the second proposal, if we were to drop the concept of a final class. I feel like by blocking subclasses in preference to extensions, we would need to be 100% sure we could add stored properties in extensions, otherwise adding a stored property would require a subclass. I think that final fully on a class tends to be superfluous if we have final and/or open on methods. This would allow for composition with little penalty for optimisations.
If we have final classes as a whole, I recommend we go with option 1.
I personally prefer Option #2. I think that a lot of us are going “that’s not swifty” and using that as a justification. Lets be honest, we’re deliberately limiting ourselves here against composition via subclassing, without writing lots of frameworks and libraries where this would directly impact us and we’d learn our lessons. Why block composition via subclassing? Opinion, based on “this can all be done by extensions and that feels swifty”. Well it currently can’t be done via extensions. Perhaps we should be more open about this and allow users to choose their composition methodology… I feel like we’re blocking something unnecessarily.
Blocking all the members of a class can still be done, but we could theoretically allow composition on classes that are otherwise final or sealed. Why not?
I love the concept of clear subclassing with “Open” as an extension of the access level, showing public *and* subclassable. This is actually how I assumed this would work in the first place.
- 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?
Yes. I think Option 2 however slightly changes that direction, and I think that’s a good thing.
- 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?
Continued interest in the discussion. Thorough read.
> On 22 Jul 2016, at 1:33 AM, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> Hello Swift community,
> The third review of "SE-0117: Allow distinguishing between public access and public overridability" begins now and runs through July 25. The proposal is available here:
> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
> or, if you would like to keep your feedback private, directly to the review manager.
> What goes into a review?
> The goal of the review process is to improve the proposal under review through constructive criticism and contribute to 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
> Thank you,
> -Chris Lattner
> Review Manager
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution