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

David Beck david at davidbeck.co
Thu Jul 7 13:20:09 CDT 2016


> * What is your evaluation of the proposal?

I’m on board with solving the problems outlined here. In particular, continuing to make Swift safe and fast by default and extending access and features as needed. And I am mostly on board with the solution proposed here.

I have 2 big concerns:

1) Unlike most changes to the language, the problems from this change will not be immediately evident. While a module author typically uses their module in at least 1 project of their own, they don’t see the usage point for most of their API. This change will likely cause a long process of updates for modules going back and forth between updating the module and the app that uses it.

2) As the proposal is written, we are introducing 2 new terms into the language that are not that different from what we already have (final and public/internal/private). I would really like to see these terms merged to limit the vocabulary of the language. Personally I am in favor of public(extensible) for both classes and methods.

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

Yes. In particular, giving the language the ability to fine tune what can and cannot be overridden is very helpful.

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

Yes. The biggest argument I’ve seen against this behavior is that we need to be able to fix Apple’s frameworks for them. But the direction of Swift is away from doing this (having final available at all, no method swizzling etc.) and for good reason.

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

There was an interesting discussion somewhat related to this on the latest Bike Shed (http://bikeshed.fm/70) coming from the perspective of Ruby developers.

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

I’ve read through the final proposal and have also given it occasional thought over the weeks building up to the proposal. I’ve also read a handful of responses.


David Beck
http://davidbeck.co
http://twitter.com/davbeck
http://facebook.com/davbeck

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160707/5f9769f1/attachment.html>


More information about the swift-evolution mailing list