[swift-evolution] Pitch: Cross-module inlining and specialization
Slava Pestov
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.
Slava
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20171003/ee8d4b5d/attachment.html>
More information about the swift-evolution
mailing list