• Thin layer around C
• Message-dispatch runtime
• Static and dynamic (you choose)
• The “real” inspiration for Java:
• http://cs.gmu.edu/~sean/stuff/java-
objc.html
Slide 32
Slide 32 text
• Single inheritance + interfaces (“@protocols”)
• @protocols can have optional methods
• Fields protected by default
• All methods are virtual and overridable
• Methods can be added to existing classes
• Full introspection / reflection
• Messages can be intercepted and forwarded à la
AOP
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
No content
Slide 35
Slide 35 text
No content
Slide 36
Slide 36 text
No content
Slide 37
Slide 37 text
Demo
Slide 38
Slide 38 text
No content
Slide 39
Slide 39 text
Cocoa Touch
Slide 40
Slide 40 text
No content
Slide 41
Slide 41 text
No content
Slide 42
Slide 42 text
iPhone Specifics
Slide 43
Slide 43 text
No content
Slide 44
Slide 44 text
128 or 256 MB RAM
Slide 45
Slide 45 text
~70 MB for the OS!
Slide 46
Slide 46 text
no swap file
Slide 47
Slide 47 text
(no virtual memory)
Slide 48
Slide 48 text
no garbage collector
Slide 49
Slide 49 text
(manual memory
management)
Slide 50
Slide 50 text
http://cocoadevcentral.com/d/learn_objectivec/
Slide 51
Slide 51 text
no automatic objects
on the stack (C++)
Slide 52
Slide 52 text
// C++
// Memory freed when out of scope
std::string name(“Adrian”);
std::string *name = NULL;
name = new std::string(“Adrian”);
delete name;