IT Pro is supported by its audience. When you purchase through links on our site, we may earn an affiliate commission. Learn more

What is the Swift programming language, and why should I learn it?

Apple’s purpose-built language works across iOS, macOS, iPadOS and more

Apple Swift code logo

If you're an app developer, you've likely got a few favoured programming languages in your toolkit. Statistically speaking, these probably include Java, Python and some variation of C, but there's a strong argument for incorporating the Swift programming language into your arsenal if you haven't already.

Swift, often referred to as “Objective-C, without the C", is an open source programming language developed and maintained by Apple, and it's what the company recommends that developers use when creating apps for its various platforms, be it iOS, macOS or iPadOS. 

It's an evolution of the Objective-C language that Apple has been using since co-founder Steve Jobs licensed it decades ago as part of the founding of NeXT, and is built to be a simplified and highly extensible version of Objective-C.

In addition to Objective-C, Swift incorporates aspects of Python, Rust, Ruby and other languages. Many of its features focus on making Swift as easy-to-use as possible; this includes things like improved string support, option types and measures to protect against programming errors like null point dereferencing or integer overflow.

Swift and Windows

The Swift programming language was originally tailored to developing programmes for iOS, macOS, watchOS, and tvOS platforms. Until last year, its use was limited to Apple operating systems as well as two exceptions: Linux and IBM’s z/OS. This is due to the fact that Swift was designed in a way which takes full advantage of Apple's hardware and operating systems, which, as you may know, are significantly different from its competitors’. In fact, Swift is inherent to Apple, as there is no real substitute for the level of functionality offered by this specific programming language – especially when it comes to app development.

For many years, it was simply accepted that Swift was not for those who are dedicated to the Windows operating system. However, this proved to be a misconception. In September 2020, Swift finally released toolchain images for Windows 10, with the package containing almost everything a developer could need to build and run the code on a Windows operating system. However, prior to downloading, users should be equipped with a toolchain installer and Visual Studio 2019 integrated development environment. Other components, such as the Windows 10 SDK, as well as toolsets for building C++ code and the Windows Universal C Runtime, might also come in handy.

Saleem Abdulrasool, the software engineer who helped bring Swift to Windows, said that the move was made possible thanks to cross-compiling the programme on Linux. Describing the September iteration of Swift on Linux as "the beginning of a journey", Abdulrasool added that it would soon include the Swift Package Manager, which is reportedly still in development.

What can I build with Swift?

An example of an app built with Swift is Lyft, with ride-hailing company having completely re-wrote its iOS app using the programming language. While the old codebase consisted of about 75,000 lines of code, the Swift version recreated the same functionality with less than a third of that. Moving to Swift also allowed the app to feature app a new onboarding process; while the old one took more than a month and multiple engineers to implement, the new onboarding with Swift was completed within a week with only one engineer.

Other popular iOS apps built using the Swift programming language include Firefox, LinkedIn, Twitter and WhatsApp. 

Related Resource

Six things a developer should know about Postgres

Why enterprises are choosing PostgreSQL

Six things a developer should know about Postgres - whitepaper from EDBDownload now

How to learn Swift programming

Understandably, Apple is keen to get as many people as possible to a point of familiarity with its homebrew language, and it has a series of training resources in order to support this. One such resource is Swift Playgrounds - a free iPad app which helps teach kids the fundamentals of Swift programming through a series of games and challenges.

For complete beginners to the world of programming, this may be a good place to start, but it's probably a little on the simple side for all but the most novice developers. There are e-books and other official Apple resources available for more advanced learners, as well as numerous online courses for learning Swift.

Once you're familiar with Swift, the easiest way to start actually using it to build apps is to download the latest version of Xcode, Apple's IDE for macOS. This includes all the essential tools like a code editor, debugger, testing environments and more, as well as a full version of Swift and all the runtimes you'll need to start constructing apps.

Featured Resources

Activation playbook: Deliver data that powers impactful, game-changing campaigns

Bringing together data and technology to drive better business outcomes

Free Download

In unpredictable times, a data strategy is key

Data processes are crucial to guide decisions and drive business growth

Free Download

Achieving resiliency with Everything-as-a-Service (XAAS)

Transforming the enterprise IT landscape

Free Download

What is contextual analytics?

Creating more customer value in HR software applications

Free Download

Most Popular

Europe's first autonomous petrol station opens in Lisbon

Europe's first autonomous petrol station opens in Lisbon

23 May 2022
16 ways to speed up your laptop

16 ways to speed up your laptop

13 May 2022
Nvidia pauses hiring to help cope with inflation
Careers & training

Nvidia pauses hiring to help cope with inflation

23 May 2022