[swift-evolution] [Proposal] Sealed classes by default

David Sweeris davesweeris at mac.com
Wed Jun 29 18:05:16 CDT 2016



Sent from my iPhone

> On Jun 29, 2016, at 17:45, Rod Brown via swift-evolution <swift-evolution at swift.org> wrote:
> 
> From my understanding, "Sealed" or whatever we will call it technically provides no actual optimisations. We cannot assume the class is final because something inside the module may have vended a subclass.

Sure we can. Because the class is sealed, the compiler can know that no further subclassing is possible, which can allowing it to use static dispatch, inlining, etc wherever possible.

I think...

- Dave Sweeris


More information about the swift-evolution mailing list