Objective C

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

This page is far from complete, go ahead and write some more!
You can extend this page by editing it.

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.

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.

Writers: -wyrmmage