Skip to the workspace
Pebellslearn by building
Choosing a Language  ›  Lesson

History and Why Swift?

History and Why Swift? 12 minSwift was introduced in 2014 to keep Apple's existing frameworks while replacing Objective-C's silent failures with compile-time safety.

ios / History and Why Swift?

Explore each scene at your own pace.

01 · The rule

The rule

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 NS prefix 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 so

The 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.5 is known to be a Double without 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 .swift file per type, no header, no pointer stars, no square brackets.
  • Modern features. Closures, generics, enums with associated values, and built-in async/await.
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.