Swift
Apple's language for its platforms, introduced in 2014 as the successor to Objective-C.
27 steps across 1 tours, from the basics to complete programs.
The tours
- First released
- 2014
- Created by
- Chris Lattner and the Swift team at Apple
- Typing
- Static with inference; optionals make absence part of every type
- Snippets target
- 6.3
- File extensions
- .swift
What it is for
Swift is how iOS, macOS, watchOS, and visionOS software gets written: SwiftUI and UIKit apps, the App Store's modern inventory, and Apple's own frameworks increasingly among them. The design bets are distinctive — structs and copy-on-write value semantics as the default, optionals making every possible absence explicit in the type, protocols carrying shared behavior that other languages hang on inheritance — and they compile through LLVM to code fast enough that the ergonomics feel like a free lunch.
Off Apple platforms it has a real second life: the toolchain is open source and ships for Linux and Windows, Vapor runs production web services, AWS supports Swift on Lambda, and the server workgroup steers a small but serious ecosystem. Swift concurrency — async/await, actors, structured tasks — arrived in 2021 and reshaped how both app and server code handle parallelism.
The learning curve is gentler than its depth: a beginner writes let, closures, and string interpolation on day one, while the same language scales down to embedded targets and up to protocol-oriented library design. Its interop story runs both directions — seamless with Objective-C and C, and increasingly with C++ — which is how it threaded itself into forty years of existing Apple code.
Where it came from
Chris Lattner — already the author of LLVM and Clang — began Swift quietly at Apple in 2010, and the language landed as WWDC 2014's genuine surprise: a modern replacement for Objective-C, sharing its runtime and frameworks but none of its syntax. Version-to-version churn was real in the early years; Swift 3's great renaming in 2016 broke nearly every program in pursuit of API guidelines the language still follows.
Apple open-sourced Swift in December 2015 with Linux support from day one, and stability arrived in stages — source compatibility around Swift 4, ABI stability with Swift 5 in 2019, which finally let the runtime ship in the OS rather than inside every app. SwiftUI's 2019 debut re-centered Apple-platform development on Swift entirely.
Swift 5.5 brought the concurrency model in 2021; Swift 6 in 2024 made data-race safety a compile-time guarantee. Governance moved steadily outward through swift.org, the evolution process, and in 2025 the migration of the project to a community-governed organization — with the language now reaching into embedded systems and, through Foundation's rewrite in Swift itself, replacing the Objective-C substrate it was born to interoperate with.
What it is like to type
Swift types like a scripting language wearing a seatbelt: let and var open most lines, types stay invisible until they matter, and string interpolation is a backslash-paren reflex. The question mark family works constantly — ?, ??, ?., if let, guard let — and closures put braces after everything with $0 inside. Argument labels make call sites wordy in a readable way (from:, to:, at:), switch cases end in colons, and -> points out every return type. The overall feel is smooth camelCase prose punctuated by just enough symbols to keep the pinkies honest.
27 steps across 1 tours, from the basics to complete programs.
Official documentation
- swift.org
- The Swift Programming Language (the book)
- The standard library reference
- The API design guidelines
- Swift evolution (the proposal record)