Professional Documents
Culture Documents
INVENTORS
Objective-C was invented by two men, Brad Cox and
Tom Love.
Both were introduced to Smalltalk at ITT in 1981
Cox thought something like Smalltalk would be very
useful to application developers
Cox modified a C compiler and by 1983 he had a
working Object-oriented extension to C called OOPC.
INVENTORS
Tom Love acquired a commercial copy of Smalltalk-80
while working for Schlumberger Research
With direct access Smalltalk, Love added more to OOPC
making the final product, Objective-C.
In 1986 they release Objective-C through their
company Stepstone
Objective-C syntax
(void)function:(int)x,(int)y,
(char)z;
[Objectfunction:x,y,z];
C++ VS.
Objective-C
Adds OOP,
metaprogramming and
generic programming to
C
Comes with a std
library
Has numerous uses
Large and complex
code for OOP
Example: main.c
#import"stack.h
intmain(){
Stack*s=[Stacknew];
[spush:1];
[spush:2];
printf("%d\t",[spop]);
[spush:3];
printf("%d\t",[spop]);
printf("%d\t",[spop]);
[srelease];
return0;
}
$ gcc -x objective-c node.m linkList.m stack.m
main.c -framework Cocoa -o stackTest
$./stackTest
2 3 1
www.asit.amcsquare.com
Wise Machines India Pvt Ltd
# 360, Sri Sai Padma Arcade,
Varthur Main Road,
Ramagondanahalli,
Whitefield ,Bangalore 560066
9740377262
* we also have branches in Hyderabad and Chennai