
| Official website |
|---|
| Execution method: | Compiled (machine code) |
|---|---|
| Garbage collected: | Allowed |
| Parameter passing methods: | By value |
| Type strength: | Weak |
| Type expression: | Explicit |
| Type checking: | Static |
| See Also: |
Objective-C is anobject-oriented superset of thecompatible with::C language. It mostly copies the message passing system fromSmalltalk. It was popularized by NeXT, and then again byApple Inc withMac OS X andiOS to implement theCocoa frameworks. Its main reference implementation is within thegcc compiler, maintained mostly by Apple.
As of October 2011, with the release ofXCode 4.2, Apple switched fromgcc toClang as its default compiler.Clang/LLVM offers competitive execution times, better compile times, improved error messages, and supports a simpler alternative syntax for expressing NSArray & NSDictionary literals and indexing. In the same release Apple also introduced automatic reference counting (ARC) which eliminates the need to manually release/retain memory. With ARC the compiler reports an error any time it encounters a call to release, autorelease, retain, or dealloc.
The release of Xcode 4.4 (4.5 for iOS) addedsyntax to specify literals forNSArray,NSDictionary,NSNumber, andNSString, as well as subscript syntax to access elements ofNSArray andNSDictionary.
Unless otherwise stated, Objective-C code samples will assume that they are compiled with ARC enabled, and that the compiler supports Objective-C literals and Blocks.
For details of how to compile and run examples of Rosetta Code tasks written in Objective C under Linux or Windows seeGNUstep
This category has the following 3 subcategories, out of 3 total.
The following 158 pages are in this category, out of 158 total.