You are here: >

Objective-C

Objective-C is an object-oriented programming language first developed in the mid-1980s by engineers Brad Cox and Tom Love. It is based on the C programming language and uses a system of message passing derived from the programming language Smalltalk. Objective-C was licensed by NeXT in 1988 and is the programming language used in the majority of Apple software today.

What is different about Objective-C?

In Objective-C, object-oriented programming is based on passing messages between object instances. Unlike other OOP languages where you call the method of an instance to invoke its behavior, in Objective-C you send it a message. The two types of programming are more or less equivalent, but there are differences. For example, when an object in Objective-C is sent a message, it can choose to ignore it or forward it on to another object, rather than return a value.

Here is an example "Hello, World!" program written in Objective-C:

#import <stdio.h> 
#import <foundation foundation.h="">

int main(void) 

{ 

  NSLog(@"Hello, world!\n"); 
  return 0; 

}

Also see: Apple, Object, Programming language, Programming terms