Re: What is Core Foundation, and other terminology/history questions.
Re: What is Core Foundation, and other terminology/history questions.
- Subject: Re: What is Core Foundation, and other terminology/history questions.
- From: Erik Buck <email@hidden>
- Date: Mon, 18 Aug 2008 08:37:38 -0700 (PDT)
Disclaimer: I am a Cocoa programmer with very little real life Carbon experience, so I apologize in advance if I have inadvertently slighted Carbon.
According to folks inside Apple, the NeXT frameworks going back all the way to NeXTstep 0.8 in 1988 had an underlying mostly private C implementation. I say mostly private because C constructs like MapTable and List which became NSMapTable and ??? were public way back then (as I recall).
When Apple started the transition from Openstep to Cocoa, they decided to make a lot of previously private NeXT related C API public. In the process, they formalized and sanitized the C interfaces, invented CFRelease() and CFRetain(), and most importantly invented "toll free bridging" so that (for example) CFString and NSString are effectively interchangeable. The newly public API was called Core Foundation.
When Apple started to transition from Toolbox to Carbon, they took the opportunity to base Carbon on Core Foundation. That decision formalized and sanitized the pattern for CFRetain() and CFRelease() of Carbon opaque data types. I gather that the old Toolbox had various different policies about who was responsible for freeing resources that were allocated by frameworks
At any rate, such policies were always an issue in old C frameworks regardless of the platform.
Carbon embraced the Core Foundation patterns. The Carbon team extended Core Foundation with lots of data types and functions that never existed in NeXTstep/Openstep. Many of the extensions were for wacky Mac OS only features and idioms that NeXTstep never needed because it was built on standard wacky Unix features and idioms.
The Cocoa team occasionally and inconsistently wrapped new Carbon inspired Core Foundation capabilities in Objective-C Cocoa classes. For example, the Cocoa eventually added support XML parsing, resource forks, Mac OS File Specs, file system aliases, etc. based on Carbon inspired Core Foundation capability. Just to add a wrinkle, Some of the Cocoa capability that was inspired from Carbon actually got re-written later and diverged from the Carbon implementation
The Carbon universe also expanded as more and more NeXT inspired Cocoa capabilities and idioms started to migrate into Carbon. More NeXT like menu functionality, common pasteboards, support for Services, several common user interface panels, sheets, etc. all migrated into Carbon.
There are lots of different but overlapping areas between Carbon and Cocoa. We still have different and incompatible NSRunLoop and CFRunLoop for example.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden