[swift-dev] Type metadata and identity

Jordan Rose jordan_rose at apple.com
Tue Feb 23 15:51:10 CST 2016


Hi, all (but especially the perf team). ChrisW and I are working on importing Objective-C generics as Swift generics <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160111/006790.html>, getting at least the bare minimum working. One interesting thing here is that Objective-C generics are type-erased, meaning that there isn't a different Class for, e.g. NSLayoutAnchor<NSLayoutXAxisAnchor *> and NSLayoutAnchor<NSLayoutYAxisAnchor *>. That means that the type metadata pointers for those two types will be identical.

Can anyone think of problems this will cause? Do we rely on different types having different metadata for anything other than downcasting? (See the proposal for a discussion of downcasting.)

Thanks,
Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160223/2349da36/attachment.html>


More information about the swift-dev mailing list