Apple Announces Swift
Published:
Apple announced Swift at WWDC on June 2, 2014 — a complete surprise to the developer community, as the project had been kept entirely secret. Chris Lattner, who had joined Apple in 2005 and created the LLVM compiler infrastructure and Clang C/C++ frontend, had been developing Swift in secret since July 2010 as a modern replacement for Objective-C. Objective-C had been Apple’s primary development language for iOS and macOS since NeXT’s acquisition in 1997, but it carried decades of C compatibility baggage: pointer arithmetic could produce undefined behavior, nil pointer dereferences silently returned 0 or nil (a common source of logic errors), string handling required manual bridging between NSString and C strings, and the square-bracket message-sending syntax ([object method:argument]) was unfamiliar to developers coming from any other modern language. Xcode 6 Beta (released the same day) included full Swift support and Playgrounds — an interactive REPL-like environment where code executed incrementally and results appeared inline alongside the code, enabling exploration of Swift syntax and API behavior without the compile-run-debug cycle.
Swift 1.0 introduced a type system built around safety: optionals (Int? can be nil, Int cannot — the compiler prevents using an optional value without explicitly unwrapping it via if let, guard let, or the force-unwrap ! operator), type inference (let x = 42 infers Int without the declaration), generics (func max<T: Comparable>(_ a: T, _ b: T) -> T with protocol-constrained type parameters), closures (sorted(by: { a, b in a > b }), with trailing closure syntax), value types (struct and enum are value types with copy semantics, unlike Objective-C’s reference-heavy design), and string interpolation ("Hello, \(name)!" replacing NSString’s stringWithFormat:). The key architectural decision was 100% Objective-C interoperability: Swift code could call any Objective-C API without a wrapper layer, because both compiled to the same Objective-C runtime and shared ARC (Automatic Reference Counting) memory management. Developers could add a single Swift file to an existing 100,000-line Objective-C project and start writing new code in Swift while leaving the existing code unchanged.
Swift 2.0 (announced WWDC June 2015) added protocol extensions (extending protocols with default implementations — enabling “protocol-oriented programming” as a design pattern) and open-sourced Swift itself as a free software project at swift.org with an Apache License 2.0 (December 3, 2015), enabling Swift on Linux and in server contexts. Swift 3.0 (September 2016) made sweeping API naming changes to align with Swift’s naming conventions (Data(contentsOfURL:) became Data(contentsOf:)) that required significant migration work. Swift 4.0 (September 2017) added the Codable protocol (automatic JSON/Property List serialization by conforming a struct to Codable), one of the most practically impactful additions for app developers handling REST API responses. By 2017, Swift had surpassed Objective-C as the preferred language for new iOS app code in App Store submissions, and by 2019 Google had adopted Kotlin as Kotlin’s counterpart for Android — both languages sharing the approach of incremental migration alongside the incumbent language on the same platform.
