4 ms·
How is Carbon portable? Carbon doesn't run on Windows, and C code runs on Cocoa. (Not sure about C++).
by Evbn 14y ago
How is Carbon portable? Carbon doesn't run on Windows, and C code runs on Cocoa. (Not sure about C++).
- saurik 14y agoI am not certain what you mean by "C code runs on Cocoa": "Cocoa" describes a set of Objective-C libraries that form a framework developers can use to build applications for Mac OS X. While you can technically drop to the Objective-C runtime functions (the Objective-C equivalent of JNI) the result is often horrific. When using Cocoa, you will find yourself constantly needing your data in the form of some random Objective-C classes. Carbon, on the other hand, stores all of its core data structures in C objects defined by a library called CoreFoundation. This library, CoreFoundation, is something that you actually will find a copy of along with your Windows version of iTunes in the form of CoreFoundation.dll. Along with another few easily ported C libraries, this allowed iTunes to maintain the same networking and storage backends on Windows and Mac OS X.