The Objective-C language is a superset of ANSI C with special syntax and runtime extensions that make object-oriented programming possible. Objective-C syntax is uncomplicated, but powerful in its simplicity. You can mix standard C with Objective-C code. Programmers familiar with C and object-oriented programming techniques often find themselves right at home with Objective-C in a matter of days.
This chapter is divided into two main sections. The first section is a basic language summary listing all additions to the language. The second section summarizes some of the most frequently used aspects of the language.
See Inside Cocoa: Object-Oriented Programming and the
Objective-C Language in
/Developer/Documentation/Cocoa for complete
Objective-C adds a small number of constructs to the C language and defines a handful of conventions used to effectively interact with the runtime system.
Message expressions are enclosed in square brackets:
The receiver can be:
A variable or expression that evaluates to an object
(including the variable
A class name (indicating the class object)
super (indicating an alternative
search for the method implementation)
The message is the name of a method plus any arguments passed to it.
The principal types used in Objective-C are defined in the
An object (a pointer to its data structure)