10

Is apple phasing out support for objective-c++? Note the following:

  • In the Objective-C language manual, there used to be a section on mixing objective-c and c++. That section is now missing.
  • Links to articles on objective-c++ on the apple developer website seem to be broken, and are now redirected, e.g. this one, which I found on this stackoverflow question.
  • Searching for c++ on the apple dev website brings very little in the way of current information.

Should I be concerned about using c++ for iOS development?

Rob Lachlan
  • 227
  • 2
  • 5

3 Answers3

19

Nah, I wouldn't worry about it.

First off, Apple's two main compiler toolchains (gcc and clang) both continue to support it. In fact, the main page for clang repeatedly indicates support for Objective C++ is a "goal of the Clang project".

Second, unlike MSDN, Apple frequently changes their online technical documentation, and links to articles on their developer website break a lot. That's kind of a pain in the neck - I keep a bunch of QuickTime API documentation on my hard drive because I'm tired of having to re-find it online.

Apple's history over the 27 years I've been programming for the Mac has been that when they plan to deprecate an API, they're very up-front about it, and typically give five or more years' notice in the form of public announcements, or at least compiler warnings. So I'd be astonished if they just quietly deprecated a programming language that many, many thousands of developers rely on.

Bob Murphy
  • 16,028
  • 3
  • 51
  • 77
2

Objective-C is suitable for dealing with the device specific part of your application. It makes developing a GUI program really easy. C++ on the other hand is needed where you need portability and/or more control on what you're doing.

Have you ever tried to develop an application that relies on OpenGL with Objective-C? Your code will become a nasty mess (specially if you need do do a lot of vector math as Objective-C does not support operator overloading).

Many libraries for OS X and iOS rely on C++ so I wouldn't worry on Apple dropping support for C++ (even Apple relies on it.)

Raphael
  • 2,234
  • 1
  • 22
  • 23
1

Absolutely the answer is no. Much of the Objective-C runtime and many private parts of public frameworks and private frameworks powering Apple software are written in Objective-C++ today and that will not likely change.

They use it to take advantage of existing open source software libraries as well as the STL where it makes sense. Clang is written in C++

Oh and all of IOKit is C++

Xcode is in many parts written in Objective-C++

C++ for the things it makes sense for, Objective-C for the API and the UI. (in other words, expose a great stable API that is plumbed with C++ where it makes sense)

uchuugaka
  • 111
  • 2