To me it doesn't seem like it. Of course I don't have sources of Foundation, but in case of GNUStep, take this example.
They have a NSArray code like this https://github.com/gnustep/libs-base/blob/master/Source/NSArray.m
Nowhere in the source do they refer to CFArray.
https://github.com/gnustep/libs-corebase/blob/master/Source/CFArray.c
Same goes for all CF counterparts. Why?
GNUStep is not the same as Apple's Foundation. I don't know much about how GNUStep is implemented, but in Apple's Foundation, NS and CF counterparts are very closely linked indeed. As you say, we don't have the source for Foundation, but there are still many ways to detect integration between the two. One really easy-to-spot one is just to inspect the class of many Foundation objects:
This little program outputs
__NSCFString
, a clue thatCFString
's implementation is indeed being used under the hood. Specifically,NSString
andCFString
(as well asNSArray
andCFArray
,NSDictionary
andCFDictionary
, and many other Foundation and CF types) are toll-free bridged—this means that their internal structures are designed to be exactly the same, such that you can actually convert one to the other with a simple typecast, with no expensive conversion process. SoNSArray
doesn't just useCFArray
, it actually is aCFArray
.Of course, since it's allowed to make your own private subclasses of classes like
NSString
,NSArray
, et al., this means that for the bridging to work, the CF functions need to be able to handle the case where what looks like a CF object is actually an Objective-C subclass, and use the Objective-C implementation if it is. And for that reason, CoreFoundation objects, which we do have much of the sources to, do actually make many references to their NS equivalents, such as theCFArray
source linked below, which contains references toNSArray
.https://opensource.apple.com/source/CF/CF-1153.18/CFArray.c.auto.html