This is a detail of implementation and doesn't have to be. You might even imagine the compiler emitting two versions of the code, one assuming the class will not be subclassed, the other not assuming that, and a smart linker linking the right version depending on the case.
So for me, in the long run, this argument is not an argument at all. Even then, is it really appropriate to sacrifice expressivity on the altar of (marginally) better performance? Jean-Denis > On 15 Aug 2016, at 09:50, Jean-Daniel Dupas via swift-evolution > <swift-evolution@swift.org> wrote: > > The non subclassable across module boundary is not just a compiler enforced > limitation. Once you compile a module with classes that are ‘final’ in the > module, the compiler may devirtualize all call sites in the module, or even > inlining some calls, making subclassing unpredictable and pointless. > > > _______________________________________________ > 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