Objective C
From GDWiki
- This article refers to a programming language. For a comprehensive discussion of its traits, history and usage, see Objective-C at Wikipedia.
| To comply with our quality standards, this article may need to be rewritten. Please help improve this article. The discussion page may contain suggestions. |
Objective C is a programming language designed in the 1980s primarily by Brad Cox. It extends the C programming language with object oriented programming concepts like those of Smalltalk.
The language approaches object-orientated programming in a different way to C++.
In Objective C, objects are sent messages:
[receivingObject message];
Further, Objective C is dynamically typed, meaning that the type of data stored in a variable can change depending on the program state. It is in some ways more similar to Java than C++; for example, it does not allow multiple inheritance.
Objective C can be compiled by the GNU Compiler Collection (gcc) for a very wide variety of hardware.
Notably, Objective C is the "blessed" programming language of Mac OS X. Objective C, the Cocoa API and Apple's XCode programming environment provide one of the most efficacious ways of application development for Mac OS X, allowing programmers easy access to system services and making it simple to abide by the Apple Human Interface Guidelines.
[edit] Making an object
To make an object in Objective-C, you type *object name * = [[*object type* alloc] init]; The key-word 'alloc' creates a place in memory for the object to be stored, and the word 'init' initializes the object, using either the default constructor or a constructor declared by you.

