INTRODUCTION

THE POPULARITY OF IOS HAS DRAWN MANY PROGRAMMERS TO APPLE'S PLATFORMS. Software on both OS X and iOS has long been written in Objective-C, a language first developed in the 1980s that is best described as an amalgamation of C and Smalltalk. Objective-C lacks many features that modern programmers expect to find in a programming language. Over the last ten years, Apple has adapted and improved Objective-C, but many programmers still find it to be an alien language.

Enter Swift. Swift is a modern programming language, built with knowledge gained in the last 30 years of programming language research. Developed by the same researchers who developed clang, the modern compiler toolchain used by Apple to build OS X and iOS software, Swift incorporates many features that are expected of a modern programming language. It sports a strong type system to prevent many of the mistakes prevalent in both C and Objective-C programming. It has a refined class system complete with static and computable properties. It supports closures and treats functions as first-class objects, allowing them to easily be saved as variables or passed to functions and methods as parameters. As you read this book, you'll find many more advanced features that are present in Swift as well.

Swift has been designed from the ground up to be a modern programming language suitable for both systems and application development on Apple's platforms. Apple has already thrown a lot of support behind Swift, and the ...

Get Professional Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.