Skip to Content
Objective-C Pocket Reference
book

Objective-C Pocket Reference

by Andrew Duncan
December 2002
Beginner content levelBeginner
128 pages
3h 10m
English
O'Reilly Media, Inc.
Content preview from Objective-C Pocket Reference

What Is Objective-C?

Objective-C is an object-oriented language: it supports hierarchies of substitutable types, message-passing between objects, and code reuse through inheritance. Objective-C adds these features to the familiar C programming language.

Because Objective-C is an extension of C, many properties of an Objective-C program depend on the underlying C development tools. Among these properties are:

  • The size of scalar variables such as integers and floating-point numbers

  • Allowed placement of scoped declarations

  • Implicit type conversion and promotion

  • Storage of string literals

  • Preprocessor macro expansion

  • Compiler warning levels

  • Code optimization

  • Include and link search paths

For more information about these topics, consult the documentation for your development platform and tools.

Objective-C differs from C++, another object-oriented extension of C, by deferring decisions until runtime that C++ would make at compile time. Objective-C is distinguished by the following key features:

  • Dynamic dispatch

  • Dynamic typing

  • Dynamic loading

Dynamic Dispatch

Object-oriented languages replace function calls with messages . The difference is that the same message may trigger different code at runtime, depending on the type of the message receiver. Objective-C decides dynamically—at runtime—what code will handle a message by searching the receiver’s class and parent classes. (The Objective-C runtime caches the search results for better performance.) By contrast, a C++ compiler constructs a dispatch table ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro Objective-C

Pro Objective-C

Keith Lee
Learning Cocoa with Objective-C, 4th Edition

Learning Cocoa with Objective-C, 4th Edition

Paris Buttfield-Addison, Jonathon Manning, Tim Nugent

Publisher Resources

ISBN: 0596004230Errata Page