Sealed methods can be overriden inside the defined module/library but
not outside. Same benefit of classes.

L


On 18 July 2016 at 16:32, Garth Snyder via swift-evolution
<swift-evolution@swift.org> wrote:
>> Nevin/Garth, please remember final and sealed are two different
>> concepts: final prevents anyone from subclassing/overriding while
>> sealed prevents from subclassing/overriding *outside* the module they
>> are declared. Thus final is not the same as sealed.
>
> No, of course it isn’t. I could well be misguided, but I don’t think I’m 
> disoriented. :-)
>
> Ultimately, the question is whether sealed methods offer any additional 
> utility or advantage beyond that of sealed classes plus final. The existence 
> of “final” is certainly relevant, as it already provides some, but not all, 
> of the features of method-level sealing.
>
> I’d still like to see a really solid use case that requires the full 
> semantics of sealing at the method level.
>
> Garth
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to