History and Why Swift?
TrailLog's team is starting fresh in 2026. Nobody debates the language for long: new iOS code is written in Swift. Knowing why helps you understand the design choices you will bump into every day, like optionals and value types.
The rule
Swift keeps Apple's frameworks but makes mistakes fail early and loudly.
A short history:
- 1980s–2000s: Objective-C powers NeXTSTEP, then Mac OS X, then the first iPhone SDK in 2008. The
NSprefix on types is a leftover from NeXTSTEP. - 2010: work on a new language starts inside Apple.
- 2014: Swift is announced at Apple's developer conference (WWDC).
- 2015: Swift becomes open source, and later runs on Linux and Windows too.
- 2019: Swift 5 brings ABI stability, so the Swift runtime ships inside iOS and apps no longer bundle their own copy.
Swift was not a new platform. It talks to the same frameworks — Foundation, UIKit, Core Data — that Objective-C used. What changed is the language's attitude to errors. Compare storing a hike's name:
let name: String = "Ridge Loop" // can never be nil
var note: String? = nil // might be missing, and says soThe benefits over Objective-C follow from that attitude:
- Safety. Missing values are marked with optionals and checked by the compiler, instead of silently messaging
nil. - Strong types with inference.
let km = 8.5is known to be aDoublewithout you writing it. - Value types. Structs and enums are copied, not shared, which removes a whole class of "who changed my data?" bugs.
- Less ceremony. One
.swiftfile per type, no header, no pointer stars, no square brackets. - Modern features. Closures, generics, enums with associated values, and built-in
async/await.
The shortcut
When you meet a Swift rule that feels strict, ask: "Which Objective-C bug does this stop?" The answer almost always explains the rule.
The rule
Swift refuses to compile
let total = hikes.count + 0.5becauseIntandDoubledo not mix.
The trap is thinking Swift is "Objective-C with nicer syntax". The syntax is nicer, but the real change is that the compiler now catches mistakes before your users do.
Drills
Answer fast — trust the rule.
When was Swift first announced?
What did ABI stability in Swift 5 make possible?
Which Swift feature most directly prevents the silent nil-messaging bugs of Objective-C?
Which statement about Swift and Apple's frameworks is true?
Remember
- Swift (announced 2014) keeps Apple's frameworks but makes mistakes fail early and loudly.
- Shortcut: for any strict rule, ask which Objective-C bug it stops.
- Trap: the big win is safety — optionals, value types, strong typing — not just prettier syntax.
