Are there any pitfalls, when mixing Objective C & C++ in a .mm file, should I prefer sticking to just pure ObjC when possible?
Besides the caveats described in the Objective-C++ section of the Objective-C Programming Guide, there's nothing scary about Objective-C++. It takes a lot longer to compile than Objective-C, however and using C++ in a header infects any code that includes that header with the Objective-C++ requirement. So for your sanity, and the sanity of any clients of your code, use Objective-C when possible in "public" APIs and Objective-C++ when necessary.
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