[swift-evolution] [Proposal] Sealed classes by default
Xiaodi Wu
xiaodi.wu at gmail.com
Wed Jun 29 13:11:19 CDT 2016
Do we really need a new keyword? Since we already have syntax like
`internal(set)` couldn't we do `internal(unsealed)`, etc.
On Wed, Jun 29, 2016 at 12:21 PM, David Sweeris via swift-evolution <
swift-evolution at swift.org> wrote:
> > On Jun 29, 2016, at 12:15 PM, Michael Peternell <
> michael.peternell at gmx.at> wrote:
> >
> >
> >> Am 29.06.2016 um 15:54 schrieb David Sweeris via swift-evolution <
> swift-evolution at swift.org>:
> >>
> >> +1 for the concept of a "sealed” class.
> >> -1 for making it default.
> >
> > Aren't sealed classes already implemented? I think the keyword is
> `final`..
> > So there is nothing left to do :)
>
> No, `final` doesn’t allow for any subclassing, but `sealed` allows for
> subclassing within your module (where you can presumably write more
> efficient code based on knowledge of each subclass).
>
> - Dave Sweeris
> _______________________________________________
> 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/20160629/5d4e5181/attachment.html>
More information about the swift-evolution
mailing list