What is Swift, Apple’s New Language?

Swift logo

Swift has recently replaced Objective-C as Apple’s programming language for iOS and OS X devices. The code has been described as, “Objective-C without the C”. But what does that mean? While this language can still work with Objective-C, it will most likely replace the language entirely one day (at least for Apple apps). Swift is safer, easier to write, and fun. Here’s what you should know about Apple’s new language.

What is Swift?

According to Apple, Swift is a more natural language to write compared to Objective-C. It also is safer, as it does not expose unsafe accessors — this means that bugs are less likely to get into the code. If bugs do get in, Swift triggers a crash that will stop on the line of code where the problem is. This allows programmers to fix bugs/problems quickly. Swift is also more similar to other object-oriented languages such as Java and C#, as it doesn’t use Smalltalk commands. However, it still uses features of Objective-C, but with cleaner syntax.

The History of the Language

Chris Lattner began developing Swift in 2010, and eventually many other Apple programmers joined in. The language took ideas from countless other languages, such as Objective-C, Ruby, Python, C#, and more. A beta version was released in 2014 at the Apple WorldWide Developers Conference, along with an app written in that code. On the iBooks store, you can download The Swift Programming Language, a free manual. Swift was released in September 2014 for iOS, and updated versions have been released since then. The 3.0 version came out in September 2016. Apple also recently released an app called “Swift Playgrounds”, which can teach people how to code the language.

Although Swift is a new language, it will quickly rise to prominence, since it is used by Apple. While apps can still be created using Objective-C, it probably won’t be long before this new language overtakes Objective-C in popularity.