> On May 8, 2017, at 6:21 PM, Giacomo Leopizzi via swift-dev 
> <swift-dev@swift.org> wrote:
> Hello everyone! 
> I was discussing with a friend about metaclasses in Objective-C. In Obj-C the 
> root meta-class was the NSObject's one.

ObjC does not have a single root class.  Most ObjC classes inherit from 
NSObject, but that is not guaranteed, and in fact there are other common root 
classes including NSProxy.

> When in a swift class you create a subclass of NSObject, the root metaclass 
> should be the same. What happen when you delcare a class without NSObject 
> dependence? There is an hidden root-class? Where can we read more about this 
> topic? 

When ObjC interop is enabled, Swift classes that do not inherit from NSObject 
use a private root class.  However, that is a private implementation detail and 
we don't promise much about it.

Do you have any specific questions?

John.
_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev

Reply via email to