Search code examples
objective-cobjective-c++

Differences between Objective-C vs. Objective-C 2.0


I reserved 2 library books which came on the same day. I saw them on the shelf and realized that they were the same except one was about ObjC and one was about ObjC 2.0.

Also, what is the Objective-C++?


Solution

  • Apple has an overview of Objective-C 2.0 on its Web site, though it's worth noting that the version of Objective-C 2 on the iPhone doesn't include garbage collection. Basically, the differences amount to:

    • Garbage collection (on the Mac)
    • for (id object in collection)
    • Properties and dot-syntax
    • Changes to the low-level runtime functions

    Objective-C++ is a compiler mode that allows you to intermingle C++ code with Objective-C code in the same function body.