Objective-C

Objective-C is a general-purpose, high-level programming language. Created in 1984, it was the primary language for the NeXTSTEP operating system. Following Apple's purchase of NeXT, it became the primary language for writing apps for macOS and iOS. Apple created the Swift programming language as its replacement in 2014, but it is still widely used by developers on those platforms.

Objective-C is an extension of the C programming language, adding object-oriented programming features. It uses nearly identical syntax to C for all non-object-oriented operations, like assigning variables and declaring functions. However, its object-oriented features borrow syntax from another programming language called Smalltalk. This syntax has objects communicate with each other by sending messages. Instead of calling on a predetermined method directly, as in other languages, the object instance that receives a message determines which method to use dynamically at runtime.

For example, a message from one object to another in Objective‑C looks like this:

[myObject sayHello]

This code snippet sends a message to the object named myObject, telling it to perform a method called sayHello. If the class that myObject belongs to includes a method named sayHello, it runs that method. Otherwise, the app checks the superclass that contains myObject's class, going further up the hierarchy until it finds the method. Other programming languages, like C++ or Java, bind methods to objects at compile time — making the program faster since it already knows what method to run, at the cost of making it less flexible.

Objective‑C does not include a standard library in the way that C++ does. Instead, all Objective‑C apps use one of several software frameworks containing default functions and code. For example, apps developed for macOS use the Cocoa framework, included in the Xcode SDK.

Updated March 28, 2023 by Brian P.

quizTest Your Knowledge

Which of these audio formats uses lossless compression?

A
MP3
0%
B
AIFF
0%
C
AAC
0%
D
FLAC
0%
Correct! Incorrect!     View the Lossless definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Objective-C on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.