What are the trade-offs for using Carbon vs. Cocoa considering a developer with about 15 years of programming experience already in C/C++.
Is Carbon a dead end with OS X?
What are the trade-offs for using Carbon vs. Cocoa considering a developer with about 15 years of programming experience already in C/C++.
Is Carbon a dead end with OS X?
It seems that the whole situation is a bit complicated, but while Carbon may not be a complete dead end for Mac OS X development, if you're new to developing for the Mac, I can't see why you would start with anything other than Cocoa.
Carbon is a dead end, Apple isn't really into supporting it much more(as in how they act, as opposed to what they say), my guess is Objective-C is all they need, or maybe they're making a more modern C++ api, not like Carbon and its Win32 style api.
Oh, and the Ojective-C messaging framework is a really good solution to handle scalable multithreaded application with out complicating things or requiring programmers to think much about multithreaded issues like races and dead-locks. Actually I think that in that sense it's even superior to C# or C++, for simple application development during the next few years, until the next language revolution.
There are a few compelling reasons to use Carbon, but for most new code, using Cocoa will be less work overall (even including learning Objective-C). Unless you've got existing Carbon code, or you're trying to tie into an existing cross-platform UI library, you probably ought to use Cocoa.
Carbon is a "dead end" in that Apple's not adding as much new API to Carbon vs. the Cocoa frameworks. Carbon is also not supported for 64-bit programs. It's not likely that Carbon will actually cease to be supported entirely any time soon.
You're supposed to be able to mix C, C++, and Objective-C, so you could use Cocoa purely for the UI, and write the rest in C++.
Cocoa (with Objective-C) is great for the UI.
But hat does not prevent you from mixing this with C++ for storing and manipulating the data behind the scenes.
As for Carbon. I am not sure.
I use the Objective-C and C++ in combination. Use the correct language for the correct job.
One thing to consider is iPhone portability; I think it has Cocoa APIs only.
Mac OS X developers who primarily use Cocoa still use Carbon all the time. It is a very common occurrence to have to use a carbon API when there isn't an equivalent Cocoa API.
Just think of Carbon as another tool (or rather set of tools) in your API toolbox. There's no need to play the "OMG Carbon Sucks! Cocoa rules!" game. It isn't healthy.
I'd hazard a guess that most popular Cocoa applications have a dash of Carbon in them.
The iPhone does change this a little. The iPhone SDK is (mostly) new from the ground app and Carbon wasn't included (but then so was a huge chunk of Cocoa too).
Use whatever tool allows you to do you work most efficiently and stop worrying about the whole Cocoa vs Carbon thing.