View Single Post
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#29
Originally Posted by daperl View Post
Objective C is a superset of C++
Not really. Both languages were independent attempts to add object oriented features to C, and they are very different. Language purists seem to thing Objective C, being smaltalk-like in its OO, is much better at it, though in real life it's almost never used outside of NeXTSTEP and derivatives so it's a bit of a moot point.

You can add .cpp files directly to your Xcode projects, and I'm guessing the same goes for .c files.
Historically the C++ ABI has been a mess and it was very difficult to link C++ code with anything. Things are better now, and there's even an "Objective C++" but don't try mixing C++ and Objective C classes, namespaces etc unless you like living in interesting times. Mixing either language with C is much more straightforward of course.
 

The Following 5 Users Say Thank You to lma For This Useful Post: