Programming language · 2014

Swift

General-purpose, multi-paradigm, compiled programming language.

Official site ›
Swift logo
C, C++, Swift, Machine Code, LLVMWritten in
2014First released
AppleDeveloper
staticTyping
Apache Software License 2.0 and Apache LicenseLicense
Built fromInfluenced Swift CC++SwiftMachine CodeLLVMObjective-CHaskellRustRust
CompilerBootstrapInfluence
ReplacedObjective-C for Apple platform apps
Being replaced byStill current; the language Apple recommends

What is Swift written in?

The Swift compiler is written in C++, with a growing amount of Swift, and uses the LLVM backend. The Swift standard library is written in Swift.

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

What language is Swift written in?
The Swift compiler is written mainly in C++ and uses LLVM as its backend, while the Swift standard library is written in Swift. Apple open-sourced the toolchain in 2015.
What languages influenced Swift?
Swift was influenced by Objective-C, Rust, Haskell among others. See the influence section above for the full list.
Which languages did Swift influence?
Swift influenced Rust among others.
Is Swift self-hosting?
Yes, Swift is self-hosting, its compiler can compile itself.
When was Swift first released?
Swift was first released in 2014. It was designed by Chris Lattner, Doug Gregor, and Apple Inc..

Evidence Sources

Discover More

Embed this graph

Paste this iframe into any HTML page to show the Swift relationship graph.

<iframe src="https://www.languagelineage.org/embed?lang=swift" width="100%" height="500" loading="lazy" style="border:0" title="Swift relationship graph"></iframe>

Please attribute the visualization to Language Lineage and link to the Swift source record.

Explore Swift in Graph →