Est. 1984 Intermediate

Objective-C

A thin object-oriented layer over C that grafts Smalltalk's dynamic messaging onto a systems language, and the foundation on which NeXTSTEP, macOS, and the first generation of the iPhone were built.

Created by Brad Cox and Tom Love

Paradigm Reflective, class-based object-oriented, with imperative and procedural C as a strict subset
Typing Static and dynamic; weak; with optional runtime type information and message-based dispatch
First Appeared 1984
Latest Version Objective-C 2.0 (announced 2006); the language and runtime are maintained today through the Clang/LLVM compiler and Apple's modern Objective-C runtime

Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C language. First appearing in 1984, it was designed by Brad Cox and Tom Love as the smallest possible extension that could bring real object-oriented programming to C programmers without giving up C’s performance, its libraries, or its place in the Unix world. For most of its history it was an obscure commercial product — until NeXT, and later Apple, made it the language in which an entire generation of Mac and iPhone software was written.

C, plus objects, plus messages. Objective-C is a strict superset of C: any valid C program is a valid Objective-C program. The object system is bolted on through a single new idea — sending messages to objects with square-bracket syntax, [receiver message] — resolved at runtime rather than compile time.

History & Origins

In the early 1980s, Brad Cox and Tom Love were working at ITT Corporation and later at Productivity Products International (PPI), where they became convinced that the software industry needed the kind of reusable, interchangeable components that hardware engineers took for granted. Cox had studied Smalltalk, the pioneering object-oriented language from Xerox PARC, and admired its flexibility — but Smalltalk demanded its own environment and runtime, which made it impractical for the C and Unix shops that dominated commercial development.

Cox’s solution, beginning around 1981, was pragmatic: rather than build a new language and ecosystem, he would extend C. His early Object-Oriented Pre-Compiler (OOPC) translated Smalltalk-like message expressions into ordinary C, which any C compiler could then build. By 1984 this had matured into Objective-C proper, a true superset of C paired with a runtime library that implemented dynamic message dispatch. In 1986, Cox laid out the underlying vision in his book Object-Oriented Programming: An Evolutionary Approach, framing objects as “Software-ICs” — software integrated circuits that could be designed once and reused like physical chips. PPI, renamed Stepstone, sold Objective-C commercially, but adoption was modest.

The language’s fortunes changed when NeXT, the company Steve Jobs founded after leaving Apple, licensed Objective-C from Stepstone in 1988. NeXT chose it as the foundation for NeXTSTEP and its rich application frameworks, extending the GNU Compiler Collection (GCC) to compile the language. NeXTSTEP’s class libraries — the ancestors of today’s Foundation and AppKit, recognizable by their NS prefix — were thoroughly object-oriented and elegant, and they showcased what Objective-C made possible.

When Apple acquired NeXT in 1997, it brought both the operating system and its language home. NeXTSTEP became the technical core of Mac OS X, and Objective-C became Apple’s flagship development language — a position it would hold, and dramatically expand, with the launch of the iPhone a decade later.

Design Philosophy

Objective-C’s defining choice is dynamic messaging. In a class-based language like C++, calling a method is essentially a function call resolved largely at compile time. In Objective-C, you instead send a message to an object, and the runtime looks up what to do with it while the program is running. The receiver decides how to respond — and may even respond to messages it was never statically declared to handle.

This runtime-centric model gives the language much of its character:

  • Late binding everywhere. Which code runs in response to a message is determined at runtime, enabling patterns that are awkward in more static languages.
  • Introspection and reflection. Objects can be queried about their class, the messages they respond to, and their structure, all at runtime.
  • A small, comprehensible runtime. The object system is implemented as a C library that programmers can understand and even manipulate directly.

The other half of the philosophy is pragmatic continuity with C. Because Objective-C is a strict superset of C, existing C code, libraries, and system calls remain directly available. Performance-sensitive code can drop down to plain C, while higher-level program structure benefits from objects. This pairing — a fast, low-level core with a flexible, dynamic object layer on top — is exactly what made the language attractive for building operating-system frameworks.

Key Features

  • Message-passing syntax. Method calls use bracket notation, [object doSomethingWith:argument], with named (“keyword”) parameters that make call sites highly readable: [array insertObject:obj atIndex:0].
  • Categories. Methods can be added to existing classes — even system classes you don’t own — without subclassing, a powerful (and occasionally dangerous) form of open extension.
  • Protocols. Named sets of method declarations that types can adopt, similar to interfaces, used heavily for delegation throughout Cocoa.
  • Dynamic typing with id. The id type can hold any object, and messages sent to it are resolved at runtime, enabling generic container and framework code.
  • Properties (Objective-C 2.0). Declared properties with @property and automatically synthesized accessors reduced boilerplate for getters and setters.
  • Blocks. C-level closures (added with Mac OS X 10.6) that capture surrounding state, used pervasively in modern framework APIs and concurrency.
  • Manual and automatic reference counting. Memory is managed by reference counting; ARC later automated retain/release at compile time.

Evolution

The first major language revision, Objective-C 2.0, was announced at WWDC in 2006 and shipped with Mac OS X 10.5 “Leopard” in October 2007. It modernized day-to-day coding with declared properties, fast enumeration (for...in), optional protocol methods, and — on the Mac only — an opt-in garbage collector.

Memory management proved to be the most consequential area of change. The Mac garbage collector was short-lived; instead, in 2011, Apple introduced Automatic Reference Counting (ARC) through the Clang/LLVM compiler. ARC kept the deterministic, reference-counting model but made the compiler insert the retain and release calls, eliminating most manual memory bookkeeping (and the garbage collector was subsequently deprecated). Around the same era, the migration from GCC to Clang gave Objective-C far better diagnostics, tooling, and modern language features.

The arrival of blocks in 2009 brought first-class closures, reshaping framework APIs around callbacks and, together with Grand Central Dispatch, around concurrency.

Current Relevance

In 2014, Apple introduced Swift, a new language explicitly designed to interoperate with Objective-C while shedding C’s rougher edges — sometimes described as “Objective-C without the C.” Since then, new Apple-platform development has steadily shifted toward Swift, and Objective-C is no longer the default for greenfield projects.

But the language is far from gone. An enormous amount of existing macOS and iOS software — Apple’s own frameworks, long-lived commercial apps, and countless libraries — is written in Objective-C, and Swift was deliberately built to call into and coexist with it. The language and its runtime continue to be maintained through Clang/LLVM, which remains the most complete and actively developed implementation. Beyond Apple’s platforms, GNUstep keeps Objective-C runnable on Linux and other Unix-like systems.

Why It Matters

Objective-C occupies an unusual place in computing history: a commercially marginal language for its first dozen years that then, through a corporate acquisition, became the medium for one of the most successful software platforms ever built. Every native Mac app of the 2000s and the entire first wave of iPhone apps were written in it. Its design also left a clear intellectual legacy — the keyword-argument message syntax, the delegation-and-protocol patterns of Cocoa, and the emphasis on dynamic dispatch influenced how a generation of developers thought about API design, and shaped its own successor, Swift. Brad Cox’s original dream of reusable “Software-ICs” never quite arrived as he imagined it, but the language that carried it left a deep mark on modern software.

Timeline

1981
At Productivity Products International (PPI), Brad Cox begins exploring how to bring Smalltalk-style object-oriented programming to C, writing an Object-Oriented Pre-Compiler (OOPC) that translates a Smalltalk-like message syntax into plain C.
1984
Objective-C first appears, designed by Brad Cox and Tom Love. The language extends C with a small amount of new syntax — square-bracket message expressions and class definitions — layered over a runtime library.
1986
Brad Cox publishes 'Object-Oriented Programming: An Evolutionary Approach,' which lays out the language's philosophy of reusable 'Software-ICs' (software integrated circuits) assembled like hardware components. PPI is renamed Stepstone and markets a commercial Objective-C.
1988
NeXT, Steve Jobs's company, licenses Objective-C from Stepstone and builds NeXTSTEP and its Application Kit frameworks on top of it, extending the GNU Compiler Collection (GCC) to support the language.
1989
NeXT ships NeXTSTEP, whose object-oriented frameworks (the ancestors of today's Foundation and AppKit, with their 'NS' class prefix) are written in and exposed through Objective-C.
1997
Apple acquires NeXT, bringing NeXTSTEP and Objective-C in-house. The NeXT technology becomes the basis of Mac OS X, and Objective-C becomes Apple's primary application development language for the next generation of the Mac platform.
2007
Mac OS X 10.5 'Leopard' ships in October with Objective-C 2.0, announced the previous year at WWDC. It adds declared properties, fast enumeration, optional protocol methods, and an opt-in garbage collector for the Mac. The same year, the iPhone launches; third-party iOS apps (from 2008) are written in Objective-C.
2009
Mac OS X 10.6 'Snow Leopard' introduces blocks (closures) as a C-level extension, along with Grand Central Dispatch, giving Objective-C first-class anonymous functions widely used in framework APIs.
2011
Automatic Reference Counting (ARC) is introduced through the Clang/LLVM compiler (around LLVM 3.0 / Xcode 4.2). The compiler inserts retain and release calls automatically, largely eliminating manual memory management and the short-lived Mac garbage collector that preceded it.
2014
Apple unveils Swift at WWDC, positioned as a modern successor that interoperates with existing Objective-C code. Objective-C remains fully supported, but new Apple-platform development gradually shifts toward Swift.
2021
Brad Cox, co-creator of the language, dies in January at the age of 76. Objective-C remains in active use across enormous bodies of existing Apple-platform code and continues to be maintained through Clang/LLVM.

Notable Uses & Legacy

Apple (macOS and iOS frameworks)

Objective-C was the primary language for building Mac OS X / macOS and iOS applications for well over a decade. The Cocoa and Cocoa Touch frameworks — Foundation, AppKit, UIKit — were designed around its dynamic messaging, and vast amounts of system and app code remain Objective-C even after Swift's arrival.

NeXT and NeXTSTEP

NeXT built its entire NeXTSTEP operating system and developer frameworks on Objective-C, pioneering the component-oriented application design (and the 'NS' class naming) that Apple later inherited and shipped to hundreds of millions of devices.

Early iPhone App Store ecosystem

When the iOS SDK opened to third-party developers in 2008, Objective-C was the only supported language for native apps. The first generation of iPhone and iPad apps — and the developer economy around them — was written in Objective-C.

GNUstep

An open-source implementation of the OpenStep/Cocoa APIs that lets Objective-C programs and frameworks run on Linux, BSD, and other systems, keeping the language usable outside Apple's platforms.

Large iOS applications

Many long-lived, widely used mobile applications were originally built in Objective-C and still contain substantial Objective-C codebases, often interoperating with newer Swift modules within the same app.

Language Influence

Influenced By

Influenced

Swift Java Groovy Objective-J Nu TOM

Running Today

Run examples using the official Docker image:

docker pull
Last updated: