[swift-evolution] Pitch: Cross-module inlining and specialization
spestov at apple.com
Wed Oct 4 00:24:05 CDT 2017
> On Oct 3, 2017, at 10:21 PM, Jonas B <bobergj at gmail.com> wrote:
>> Yeah, but the compiler could handle NSObject as a special case. Are there enough other special cases that it is worth documenting and exposing a fragile attribute on classes to the user?
> Pitching in here.. currently if you do something remotely complex with protocols and generics you need a bunch of classes for type erasure.
> I don’t want to think about what happens if you annotate a class with the "open” access modifier as @fragile/@inlineable though. Would @fragile become transitive? :)
I don’t think it would be transitive. For instance NSObject is “fragile” because the compiler can assume it has a known size, but certainly that is not true for most subclasses of NSObject.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution