Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: You should read Object-Oriented Programming with Objective-C and The Objective-C 2.0 Programming Language instead.

The Language

This chapter describes the Objective-C language and discusses the principles of object-oriented programming as they’re implemented in Objective-C. It covers all the features that the language adds to standard C and C++.

Because object-oriented programs postpone many decisions from compile time to runtime, object-oriented languages depend on a runtime system for executing the compiled code. The runtime system for the Objective-C language is discussed in “The Runtime System.” This chapter presents the language, but touches on important elements of the runtime system.

The Apple compilers are based on the compilers of the GNU Compiler Collection. Objective-C syntax is a superset of GNU C/C++ syntax, and the Objective-C compiler works for C, C++ and Objective-C source code. The compiler recognizes Objective-C source files by the filename extension .m, just as it recognizes files containing only standard C syntax by filename extension .c. Similarly, the compiler recognizes C++ files that use Objective-C by the extension .mm. Other issues when using Objective-C with C++ are covered in the section “Using C++ With Objective-C.”

Contents:

Objects
Object Messaging
Classes
Defining a Class
How Messaging Works
Extending Classes
Enabling Static Behaviors
Exception Handling and Thread Synchronization
Using C++ With Objective-C




< Previous PageNext Page > Hide TOC


Last updated: 2008-06-09




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice