Swift & Objective-C

Objective-C: A Complete History, the Language Jobs Loved (Including the Origin of the NS Prefix)

When you start studying iOS development, there’s one language you’re bound to encounter: unfamiliar syntax filled with brackets and mysterious prefixes like NSString.

5 min read
Cover image for Objective-C: A Complete History, the Language Jobs Loved (Including the Origin of the NS Prefix)

When you start studying iOS development, there’s one language you’re bound to encounter: unfamiliar syntax filled with brackets and mysterious prefixes like NSString.

That language is Objective-C.

When you first encounter it in legacy code, it’s easy to wonder, “Where did this syntax even come from?” Once you know its history, the code looks different.

At its core, Objective-C is a language created in the early 1980s by adding Smalltalk’s object concepts to C.

That famous NS prefix comes from NeXTSTEP, the operating system of NeXT, the company founded by Steve Jobs.

Here’s what you’ll learn from this article.

  1. How Objective-C was born (C + Smalltalk)
  2. The origin and technical reason for the NS prefix
  3. Its golden age with the iPhone
  4. Why it survived into the Swift era

How Was Objective-C Born?

In the early 1980s, two engineers named Brad Cox and Tom Love had two goals.

  • C: Fast, but with no object-oriented concepts
  • Smalltalk: An elegant object-oriented language, but too slow

Their answer was Objective-C: add a very thin object-oriented layer on top of C without changing C at all.

Objective-C is a strict superset of C.

Every C program in the world is valid Objective-C code without modification.

Here’s a short code sample showing what that looks like.

// ordinary C code — also valid as-is Objective-C code
int sum = 1 + 2;

// Objective-CWhat was added: Smalltalkmessage passing in this form (brackets)
NSString *text = [NSString stringWithFormat:@"total %d", sum];

The first two lines use C syntax unchanged; the bracketed line below is everything Objective-C adds.

Its body comes from C, while its soul—the object model and message passing—comes from Smalltalk. The bracket syntax [receiver message] is a legacy borrowed directly from Smalltalk.

You can think of it as creating a completely different dish from the same ingredients—C plus object orientation—around the same time as C++.


What Does the NS Prefix Mean?

The story behind the NS prefix begins during the NeXT era
The story behind the NS prefix begins during the NeXT era

In 1985, Steve Jobs was forced out of the company he had founded, Apple.

He then founded NeXT, whose operating system, NeXTSTEP, officially used Objective-C as its development language.

NSString and NSArray use NS as an abbreviation for NeXTSTEP. Even the latest iPhone app code in 2026 still carries the name of Jobs’s late-1980s company like a fossil.

But why add a prefix at all? There’s a technical reason.

  • Objective-C has no namespace
  • Class names must be globally unique, so identical names collide
  • That led to the convention of adding company or project initials (NS for Apple, AF for AFNetworking)

Apple even officially advised that two-letter prefixes were reserved for Apple and third parties should use three letters. It’s a case of culture filling a gap in the language.

Swift no longer needs this convention because it introduced module-level namespaces. That’s why NS-free String and Array became symbols of the Swift era.


Its Golden Age with the iPhone

In 1996, Apple acquired NeXT for $400 million, bringing Jobs back after 12 years.

NeXTSTEP became the foundation of Mac OS X, and Objective-C became Apple’s official language.

Then the App Store opened in 2008. Objective-C was the only language available for building iPhone apps.

As developers worldwide rushed in, the language that had been a niche choice for more than 20 years suddenly became the hottest language around.

According to the TIOBE Index, it was named ‘Programming Language of the Year’ twice, in 2012 and 2014, and once climbed to third place behind C and Java.

In the App Store’s early days, everyone built apps with this language
In the App Store’s early days, everyone built apps with this language

Is Objective-C Still Used Today?

When Apple announced Swift in 2014, Objective-C’s era seemed to be ending. Yet more than a decade later, the language is still alive. There are three reasons.

  1. Apple system frameworks: UIKit and Foundation are still rooted in Objective-C, so Swift code communicates with them through bridging.
  2. Legacy codebases: Millions of lines of code cannot be rewritten overnight, so demand for maintenance developers remains steady.
  3. The runtime’s dynamic nature: Method swizzling is possible, allowing methods to be replaced at runtime, so analytics SDKs still rely on this runtime.

Q. Should I learn Objective-C from scratch today?

You’ll rarely start a new project in this language. But if you’re an iOS developer working with an old codebase, being able to read it is a major advantage.

Q. Is knowing only Swift enough?

Swift is enough for new development. Still, knowing where NS came from and why brackets exist will give you a much better understanding of Apple’s frameworks.


Summary

Objective-C isn’t a dead language; it’s more like a veteran preparing for retirement. It grew outside Apple alongside Jobs, then returned with him and became the heart of the world’s most valuable company.

When you encounter NSString in old code, greet it warmly. Those two letters carry 40 years of history.

References

Continue reading