I know there are a lot of "Objective-C for the C++ programmer" information out there and it could be used the other way around. I'm just curious if there is anyone who has knowledge about a "native" "C++ for the Objective-C programmer" tutorial/book?
I'm actually looking to work in C++ in parts of a upcoming iOS project. Basically I need to do a lot of wrappers around C++ code.
(I do know that they can co-exist and that Obj-C is a subset of C, just like C++, however different reasons I would like to gain more knowledge into C++. Coming from a Obj-C background I just ask for some guidance on the matter.)
Syntactically, Objective-C is an extension of C. So, some portion of Objective-C is exactly the same as C. Your experience of C would help learning such aspect of Objective-C. But the core part of Objective-C programming is made of Object Oriented class system, which you cannot find in C.
There are a lot of indicators telling us there's still a ton of legacy Objective-C code, both from Apple and from other developers, that's still in use.
If Swift succeeds, Objective-C will go away. It won't be deprecated, but it'll move to Florida to enjoy its golden years. It'll spend days running the legacy app with a million lines of code, and its nights sipping margaritas with the OAuth library everyone fears rewriting.
Objective-C is the primary programming language you use when writing software for OS X and iOS.
I don't know of a book for learning C++ for the Objective-C programmer. The fact that the Objective-C foundation libraries offer a lot out of the box (not to mention all the other frameworks which are part of the iOS and Mac SDKs, which is the main use-area for Objective-C) which is not covered by the C++ standard libraries might be a reason. The new C++11 standard and the boost C++ libraries go some way to bridging the gap.
There are quite a few articles which describe the main difference including this one.
The understanding of OOP you have aquired in Objective C as well as it's C subset (in your question you say "Obj-C is a subset of C", it's the opposite), will give you a big head start in learning C++, but it seems you have no alternative than to use C++ books and learn directly from them.
EDIT:
Adding the link to the SO post on good C++ books, suggested by @Bart in the comments.
Take a look at Pierre Chatelier's comparison of C++ and Objective-C.
This document is designed to act as a bridge between C++ and Objective-C.
http://pierre.chachatelier.fr/programmation/fichiers/cpp-objc-en.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With