> On 31 Dec 2015, at 11:25 AM, Luke Howard via swift-dev <swift-dev@swift.org> > wrote: > >> I really want to merge in the rest of the coders; so lets go ahead and omit >> the mangling stuff and leave it just as the Foundation classes . That will >> be a huge win in my book, it gives us something that is testable and >> functional enough to do some pretty impressive demonstrations of archiving. > > OK, the version I’ve pushed now removes the code that was poking into runtime > structures but still uses dlopen()/the metadata accessor for > NSClassFromString(). Tests verify on OS X and Linux (with compiler fix). > > If you want to change this further to use a static mapping table, go for it, > but I’d rather focus my time on getting the appropriate API into stdlib.
As a compromise how about a: * swift_getTypeByName() API that only takes demangled names * NSClassFromString()/NSStringFromClass() remain internal and hard fail with nested classes/generics * We decide what to do about nested class interop later (is changing the Darwin behaviour something that would even be on the table?) — Luke _______________________________________________ swift-dev mailing list swift-dev@swift.org https://lists.swift.org/mailman/listinfo/swift-dev