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

Dave Abrahams dabrahams at apple.com
Sun Jul 17 16:12:56 CDT 2016

on Sun Jul 17 2016, Tino Heth <swift-evolution at swift.org> wrote:

> I naturally assumed that "public" and "open" would be two separate
> concepts, as it has been expressed that orthogonality* is favored.
> But actually reading the proposal, it says:
> "open is invalid on declarations that are not also public", which imho
> not only is an unnecessary mingling of the two concepts, it also
> blocks the option to declare methods that can't be called outside the
> framework, which isn't that uncommon in Cocoa (methods like
> UIView.drawRect wouldn't show up in autocompletion lists anymore).

One point is to allow the possibility of non-public open methods in the
future, even if we know we don't have the time to design or implement
them today.

> The whole proposal is about limitation whose rationale is
> incomprehensible for many, but for this "restriction of the
> restriction", I can't see any rationale at all.
> - Tino
> * At class-level, there is afaics no orthogonality planned as well (a
> class that is abstract outside its moduleā€¦ might be useful as well)
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution


More information about the swift-evolution mailing list