Objective-C
Objective-C is a general-purpose, object-oriented programming language that extends the C programming language with Smalltalk-style messaging. It was the primary programming language used by Apple for developing applications for macOS and iOS platforms until the introduction of Swift in 2014.
Object-Oriented Extension of C: It builds upon the C language, incorporating its syntax and features while adding object-oriented capabilities. This means Objective-C code can seamlessly integrate with C code.
Dynamic Messaging: Inspired by Smalltalk, Objective-C uses a dynamic messaging paradigm. Instead of directly calling methods, objects send "messages" to each other. The receiving object dynamically determines which method to execute at runtime based on the message received. This provides flexibility but can lead to runtime errors if a message is sent to an object that does not implement the corresponding method.
Square Bracket Syntax for Messaging: Method calls (message sends) are enclosed in square brackets. For example, [myObject doSomething]; sends the doSomething message to myObject.
Foundation and Cocoa/Cocoa Touch Frameworks: Objective-C applications on Apple platforms heavily rely on frameworks like Foundation (providing core data types and utility classes) and Cocoa (for macOS) or Cocoa Touch (for iOS), which offer a rich set of pre-built classes and functionalities.
Declared Properties: Properties in Objective-C provide a concise way to declare and manage instance variables, including automatic generation of accessor methods (getters and setters).
Categories and Protocols: Categories allow adding new methods to existing classes without subclassing, while protocols define a set of methods that a class can choose to implement, enforcing a contract.
Prefixes for Naming: To avoid naming collisions in the global namespace, Objective-C often uses prefixes for class names, protocols, and global variables (e.g., NS for Foundation classes, UI for UIKit classes).