1. The Objective-C Philosophy

To understand Objective-C, you need to understand the philosophy behind its creation. Unlike C++, D, or Java, which were designed to be new, C-like languages, Objective-C is a hybrid language. It is a pure superset of C, meaning that every valid C program is also a valid Objective-C program, but it also allows some Smalltalk-like syntax and semantics.

One of the designers of Objective-C, Tom Love, described the square bracket syntax as a signpost reminding you that you were leaving C and entering “object land.” The original idea behind Objective-C was a way of packaging C libraries that encouraged loose coupling between components.

One of the fundamental design decisions in Objective-C was that there should be no ...

Get Objective-C Phrase Book, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.