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.