Carbon is one of Apple Inc.'s procedural application programming interfaces (APIs) for the Macintosh operating system. It provides C programming language access to Macintosh system services. Carbon provides a good degree of backward compatibility for programs to run on the now-obsolete Mac OS 8 and 9, however these systems are no longer actively supported since Apple released the final OS 9 update in December 2001.
The transition to 64-bit Macintosh applications beginning with Mac OS X v10.5 has brought the first major limitations to Carbon. Apple does not provide compatibility between the Macintosh graphical user interface and the C programming language in the 64-bit environment, instead requiring the use of the Objective-C dialect with the Cocoa API. Although Objective-C provides some significant advantages for code already written to take advantage of its Object-Oriented philosophy, the need to rewrite large amounts of legacy code has slowed the transition of Carbon-based applications, famously with Adobe Photoshop, which was eventually updated to Cocoa in April 2010.
This difficulty also extends to Apple's own flagship software packages, as the latest versions of Apple's iTunes and Final Cut Pro (as well as the features in the Quicktime engine which power it) remain written in Carbon, as of September 2010.
Carbon consists of a broad set of functions for managing files, memory, data, the user interface, and other system services. It is implemented as any other API: in Mac OS X, it is spread over several frameworks (each a structure built around a shared library), principally
CoreServices.framework, and in older Mac OS, it resides in a single shared library named
As an umbrella term encompassing all C-language API procedures accessing Mac-specific functionality, Carbon is not designed as a discrete system. Rather, it opens nearly all the functionality of Mac OS X to developers who do not know the Objective-C language required for the broadly-equivalent Cocoa API.
Full article ▸