{
  "id": "swift",
  "name": "Swift",
  "appeared": 2014,
  "creators": [
    "Chris Lattner"
  ],
  "org": "Apple",
  "type": "mobile",
  "status": "alive",
  "tagline": "Programming language for building apps on Apple platforms such as iOS and macOS.",
  "born_from": "Chris Lattner started Swift at Apple in July 2010. Objective-C sat on top of C, with C's pointers and unchecked memory, and Lattner later said that memory safety could not be added to Objective-C without removing the C underneath, which would no longer be Objective-C.",
  "reacts_to": [
    "objective-c",
    "rust",
    "haskell",
    "ruby",
    "python",
    "csharp"
  ],
  "tradeoffs": {
    "memory": "refcount",
    "types": "static",
    "run": "native",
    "concurrency": [
      "async",
      "actors"
    ],
    "cost": "Tooling and libraries are strongest on Apple platforms, reference counting needs weak references to break cycles by hand, and the binary interface was only declared stable in 2019."
  },
  "slots": [
    {
      "slot": "mobile",
      "fit": "strong"
    },
    {
      "slot": "server",
      "fit": "weak",
      "note": "Server frameworks such as Vapor exist, but server use is small."
    },
    {
      "slot": "browser",
      "fit": "none",
      "note": "Not a web page language."
    }
  ],
  "won_where": [
    {
      "what": "Apple's platforms, for which Apple describes Swift as its language",
      "source": "https://developer.apple.com/swift/"
    },
    {
      "what": "SwiftUI, Apple's framework for app interfaces on its platforms, available from iOS 13 and macOS 10.15",
      "source": "https://developer.apple.com/documentation/swiftui.md"
    }
  ],
  "alternatives": [
    "objective-c",
    "kotlin",
    "dart",
    "typescript"
  ],
  "timeline": [
    {
      "year": 2010,
      "what": "Chris Lattner starts Swift at Apple in July 2010",
      "source": "https://nondot.org/sabre/"
    },
    {
      "year": 2014,
      "what": "Apple announces Swift at WWDC 2014 as a beta for iOS 8 and OS X Yosemite",
      "source": "https://www.infoq.com/news/2014/06/apple-swift"
    },
    {
      "year": 2015,
      "what": "Apple releases Swift as open source under Apache 2.0, with Linux support",
      "source": "https://www.apple.com/nz/newsroom/2015/12/03Apple-Releases-Swift-as-Open-Source/"
    },
    {
      "year": 2019,
      "what": "Swift 5 is declared ABI stable on Apple platforms",
      "source": "https://swift.org/blog/abi-stability-and-more/"
    }
  ],
  "links": {
    "website": "https://www.swift.org/"
  },
  "pldb": "swift",
  "sources": [
    "https://nondot.org/sabre/",
    "https://www.infoq.com/news/2014/06/apple-swift",
    "https://www.apple.com/nz/newsroom/2015/12/03Apple-Releases-Swift-as-Open-Source/",
    "https://swift.org/blog/abi-stability-and-more/",
    "https://developer.apple.com/swift/",
    "https://developer.apple.com/documentation/swiftui.md",
    "https://oleb.net/2019/chris-lattner-swift-origins/",
    "https://pldb.io/concepts/swift.html"
  ],
  "verified": false,
  "last_reviewed": "2026-10-30",
  "prose": "## Why it exists\n\nChris Lattner started Swift at Apple in July 2010 ([Lattner, history of Swift](https://nondot.org/sabre/)). Objective-C was C with Smalltalk-style messaging on top, so it inherited C's pointers and unchecked memory. In a 2019 podcast Lattner explained why the team did not simply fix Objective-C: \"you can't retrofit memory safety into Objective-C without removing the C\", and removing the C would leave something that was \"not Objective-C anymore\" ([Ole Begemann, Chris Lattner on the origins of Swift](https://oleb.net/2019/chris-lattner-swift-origins/)). Apple announced Swift at WWDC 2014 as a beta for iOS 8 and OS X Yosemite ([InfoQ](https://www.infoq.com/news/2014/06/apple-swift)).\n\n## What it trades away\n\nSwift is strongest on Apple platforms, and outside them the tooling and libraries are thinner. Its binary interface was only declared stable with Swift 5 in 2019, which means that compiled code from one compiler version could not be relied on to work with another before then ([Swift.org](https://swift.org/blog/abi-stability-and-more/)). Reference counting also means that cycles of objects have to be broken by hand with weak references.\n\n## Where it won\n\nApple describes Swift as its language for all Apple platforms ([Apple](https://developer.apple.com/swift/)), and its SwiftUI framework for app interfaces has been available since iOS 13 and macOS 10.15 ([Apple SwiftUI](https://developer.apple.com/documentation/swiftui.md)). Apple released Swift as open source under the Apache 2.0 licence on 4 December 2015, with support for Linux as well as Apple platforms ([Apple press release](https://www.apple.com/nz/newsroom/2015/12/03Apple-Releases-Swift-as-Open-Source/)). Server use, with frameworks such as Vapor, is much smaller than app development.",
  "url": "https://langwhy.dev/lang/swift/",
  "markdown": "https://langwhy.dev/lang/swift.md",
  "license": "CC0-1.0"
}