Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of Core Foundation? #74

Open
dgelessus opened this issue Sep 28, 2017 · 2 comments
Open

Remove use of Core Foundation? #74

dgelessus opened this issue Sep 28, 2017 · 2 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@dgelessus
Copy link
Collaborator

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.

@dgelessus dgelessus added the enhancement New features, or improvements to existing features. label Sep 28, 2017
@freakboy3742
Copy link
Member

Sounds good to me - simplification is always a good thing, and as I understand it, moving to a CoreFoundation-less implementation would mean Rubicon could be used on Objective-C implementations that aren't Apple's.

@cculianu
Copy link
Contributor

cculianu commented Mar 6, 2018

Ha, just don't remove some of the low-level types such aas CGPoint and CGSize and CGRect, obviously. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

3 participants