Programming language · 2014
Swift
General-purpose, multi-paradigm, compiled programming language.
Official site ›What is Swift written in?
What Swift is used for
Swift is Apple's language for building iOS, macOS, watchOS, and tvOS apps, replacing Objective-C with a safer, more modern syntax. It is increasingly used for server-side Swift as well.
Notable software: a large share of modern iPhone and Mac apps, including many of Apple's own.
About Swift
Swift is a general-purpose, multi-paradigm, compiled programming language. It is a statically typed and garbage-collected language that compiles ahead of time to native machine code. It supports object-oriented, functional, and imperative programming.
Swift first appeared in 2014 and was designed by Chris Lattner, Doug Gregor, and Apple Inc. at Apple. Swift has a large, active user base today.
Swift in the language family tree
Swift drew on ideas from Objective-C, Rust, Haskell, and Python and went on to influence Rust.
Sources: Wikipedia · Wikidata · Official site
Quick Facts
- Short answer
- Swift compiler is C++ on LLVM
- Standard library
- Written in Swift
- Created by
- Chris Lattner, Apple, 2014
- Backend
- LLVM
Swift compiler and LLVM
Swift was created by Chris Lattner, who also started LLVM, so the language is built tightly on the LLVM backend that compiles its intermediate representation (SIL) to machine code. The compiler front end is largely C++; the standard library and much newer tooling are written in Swift itself.
Frequently Asked Questions
Evidence Sources
- https://github.com/swiftlang/swift
- https://forums.swift.org/t/self-hosting-swift/
- https://en.wikipedia.org/wiki/Swift_(programming_language)
- https://github.com/apple/swift/blob/main/SwiftCompilerSources/README.md
- https://en.wikipedia.org/wiki/Rust_(programming_language)
- Swift on Wikidata (Q17118377)