[swift-corelibs-dev] NSCoding methods
Luke Howard
lukeh at padl.com
Wed Dec 23 17:12:54 CST 2015
> On 24 Dec 2015, at 9:37 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>
> No, we cannot encode things "non-mangled but with the namespace". For any type other than top-level non-generic class types, using a non-mangled name is not unique. The only correct answer for arbitrary classes is to use mangled names, or something that maps one-to-one with mangled names.
Ah, thanks for pointing this out!
NSClassFromString() – which it appears Foundation uses when coding – returns a non-mangled name for a one/top-level non-generic class type (e.g. “scoderTest.CodableTest”) but otherwise the mangled type name (e.g. “_TtCC10scoderTest11CodableTest6Nested”).
Is there an equivalent function in Swift stdlib?
— Luke
More information about the swift-corelibs-dev
mailing list