-
-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Should we eventually remove the use of Core Foundation for operations like creating strings and collections? As far as I can tell, there are no bootstrapping issues where Core Foundation would be needed to access Foundation APIs. For example, NSStrings can be created from bare C data using the +[NSString stringWithUTF8String:] or +[NSString stringWithCharacters:length:] methods.
The advantage of using only Foundation is that we don't need to interface with an additional library. It's not necessary to use Core Foundation directly even with APIs that only accept Core Foundation types, because the corresponding Foundation types can be used instead, using toll-free bridging. Foundation is also more high-level and easy to use - you don't need to declare all the functions and manually keep track of object types, the Objective-C runtime takes care of everything.