Swift Introduction | Preparing to Use Swift | What Is Swift?

Swift is a completely new programming language that Apple announced at its developer conference in June 2014.

Previously, developers used a programming language called Objective-C to create macOS and iOS apps for devices such as the iPhone and iPad. This was rooted in the origins of macOS.

macOS is based on an earlier operating system called NeXTSTEP. NeXTSTEP was originally created as a platform for writing and running programs in the powerful object-oriented language Objective-C. Objective-C and NeXTSTEP were closely connected. NeXT, the company that developed NeXTSTEP, was led by Steve Jobs.

When Steve Jobs returned to Apple, NeXTSTEP also moved to Apple and became the foundation of macOS. Its appearance became more Mac-like, but its internals were based on NeXTSTEP. As a result, macOS was designed around Objective-C programs.

That underlying assumption has not disappeared. macOS and iOS include frameworks originally prepared for Objective-C, and applications run by using those frameworks. This explains why Mac and iPhone development historically required Objective-C: the operating systems were designed with Objective-C in mind.

Objective-C is not an easy language to understand. It combines C with ideas from Smalltalk, an early object-oriented language, so its syntax can feel like two languages living side by side. As C++, Java, C#, and other languages with more familiar syntax became mainstream, Objective-C increasingly came to be regarded as unusual and difficult to learn.

As Macs and iPhones became popular, many developers wanted to build applications for them. Many of those developers found Objective-C difficult to approach and wanted a more understandable language.

That situation was not ideal for Apple either. Apple therefore introduced a new language designed to be easier to learn, understand, and use: Swift.