Objective-C is a general-purpose, object-oriented programming language that adds Smalltalk-style messaging to the C programming language. It was the main programming language used by Apple for the OS X and iOS operating systems, and their respective application programming interfaces (APIs) Cocoa and Cocoa Touch.
Objective-C is a superset of C, which means every valid C program is also a valid Objective-C program. This allows Objective-C code to seamlessly interact with plain C-based libraries and system calls. Objective-C uses a messaging system based on Smalltalk instead of a dot-notation syntax for method dispatching like C++ or Java. This allows objects to be highly dynamic - objects can receive messages that they may or may not understand, and new methods can be added to existing classes.
Some key characteristics of Objective-C include:
- Object-oriented programming - Classes, inheritance, polymorphism
- Dynamic runtime - Classes and objects can be modified at runtime
- Messaging syntax for method calls instead of dot notation
- Automatic memory management with ARC or garbage collection
- Interoperability with C, C++, and other languages
To compile and run Objective-C code, you need the Xcode developer tools from Apple which include the Clang/LLVM compiler and the Foundation framework. Common uses of Objective-C include development for macOS and iOS.