Introducing the Swift Language

Programming in Cocoa was initially done in a language called Objective-C. Objective-C is an extension of the C programming language that adds constructs for object-oriented programming. In that respect it bears a superficial resemblance to C++, but the two are extremely different. Unlike C++, Objective-C is weakly typed and extremely powerful. With power comes responsibility: Objective-C also allows programmers to make ridiculous errors.

Over the past several years, Apple’s engineers have gone to heroic lengths to make Objective-C faster and add more modern features, but in order to move forward, a new language was needed, free of the limitations of the past. Swift, developed by a small team led by ...

Get Cocoa Programming for OS X: The Big Nerd Ranch Guide 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.