[swift-evolution] [Review #2] SE-0117: Default classes to be non-subclassable publicly

Amber, SimpleTouch amber at simpletouchsoftware.com
Mon Jul 18 18:28:22 CDT 2016

        * What is your evaluation of the proposal?

Quoting Motivation : "The major observation here is that not all classes
make sense to subclass, and it takes real thought and design work to make a
class subclassable *well*. As such, being able to subclass a public class
should be an additional "promise" beyond the class just being
marked public."

There seems to be two questions.

   1. should a class being designed  be sealed or not?  ’final’ already
   works, changing defaults seems unnecessary.
   2. how does the class designer go about selecting what to expose for
   possible overriding in sub-classes.  I agree with the proposal.
   Selectively publishing members is a better way to think about the class
   design, and will result in clearer intent and better design.


   1. leave `final` as is
   2. require explicit annotation of members for overriding. ( `default`,
   `published`, `open` )
   3. whether a class or member is public, internal, or private should have
   no bearing on number 1 or  2.
   4. if there are no `published` members, class is implicitly final.

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

As proposed the ideas are very much in line with Swift,  hopefully as
suggested even more so.

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

A moderate amount of thought and experimentation. I did not have time to
read historical discussions.


On Sat, Jul 16, 2016 at 1:52 AM Chris Lattner via swift-evolution <
swift-evolution at swift.org> wrote:

> Hello Swift community,
> The second review of "SE-0117: Default classes to be non-subclassable
> publicly" begins now and runs through July 22. The proposal is available
> here:
> https://github.com/apple/swift-evolution/blob/master/proposals/0117-non-public-subclassable-by-default.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.
> 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
>         https://github.com/apple/swift-evolution/blob/master/process.md
> Thank you,
> -Chris Lattner
> Review Manager
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160718/83c3e7d7/attachment.html>

More information about the swift-evolution mailing list