01 — the bracket message
A message send in brackets: receiver, selector, arguments. Verbose, unmistakable.
NSString *s =
[@"Mac" stringByAppendingString:@"intosh"];§ 02 — Eras · 1984
Smalltalk messages bolted onto C — Apple’s thirty-year accent
Left: era context, features, and the 101 hello. Right: 3 core concepts, 3 deeper 201 lessons, the factorial specimen, and where Objective-C lives today — each column scrolls on its own.
Objects were proven, but C owned systems software. Objective-C brought messaging to C with a layer thin enough to ship.
Verbose brackets, two type systems in one file, and (for most of its life) memory management by hand.
Session one is the smallest program that still counts as speaking Objective-C: what every tutorial prints first, in the dialect that mattered when the language arrived (1984).
#import <Foundation/Foundation.h>
int main(void) {
NSLog(@"Hello, world");
return 0;
}101First contact — hello world and 3 ideas that define how Objective-C reads. 201 — 3 lessons on mechanisms you meet after the factorial specimen: the sharp edges practitioners actually use.
3 fragments, each naming a habit of mind in Objective-C. Read the note, then the code — together they are the 101 in one sitting.
01 — the bracket message
A message send in brackets: receiver, selector, arguments. Verbose, unmistakable.
NSString *s =
[@"Mac" stringByAppendingString:@"intosh"];02 — interface & implementation
The @-directives layer objects over plain C — two languages, one file.
@interface Ship : NSObject
@property (copy) NSString *name;
- (void)sail;
@end03 — categories
Open any class and add methods — for better and for worse.
@interface NSString (Nautical)
- (BOOL)isShipName;
@endThe 201 assumes you have read the 101 and the specimen. Each lesson is one mechanism — what it is for, how it looks in code, and the trap or payoff that makes Objective-C distinctive at scale.
Blocks are closures with captured state — the way to pass behaviour to asynchronous APIs without the ceremony of a target-selector pair.
[array enumerateObjectsUsingBlock:^(id obj, NSUInteger i, BOOL *stop) {
NSLog(@"%@", obj);
}];Objective-C’s runtime is an object graph you can edit at run time: swizzling a method, adding a class, or forwarding a message no one implements.
Method m = class_getInstanceMethod([Foo class],
@selector(bar));
method_exchangeImplementations(m, other);Nullability annotations and parameterized types are compile-time only — they erase to plain objects, keeping the runtime compatible.
- (nullable NSArray<NSString *> *)namesFor:(nonnull NSString *)key;The bracket message: Smalltalk’s words bolted onto C’s bones — verbose, unmistakable, and the sound of Apple software for thirty years.
NSString *s =
[@"Mac" stringByAppendingString: @"intosh"];runclang -framework Foundation fact.m -o fact && ./fact
Legacy Apple platforms; Swift interoperates with it to this day.