Jump to ratings and reviews
Rate this book

The Swift Programming Language

Rate this book
Swift is a new programming language for creating iOS and OS X apps. Swift builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun. Swift’s clean slate, backed by the mature and much-loved Cocoa and Cocoa Touch frameworks, is an opportunity to reimagine how software development works.

500 pages, ebook

First published June 2, 2014

128 people are currently reading
428 people want to read

About the author

Apple Inc.

101 books370 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
182 (38%)
4 stars
199 (41%)
3 stars
84 (17%)
2 stars
9 (1%)
1 star
3 (<1%)
Displaying 1 - 30 of 51 reviews
Profile Image for Linda.
428 reviews36 followers
July 10, 2015
Whenever a new programming language is introduced my reaction tends to be, "here we go again" However, in this case, I was somewhat excited. Since Mac OS and iOS programming is in Objective C and Objective C, while more palatable than C++, is still carrying around C's baggage, this looked like an opportunity.

The book itself is well-written and very easy to follow.

The language itself looks quite expressive though two oversights seems to be access modifiers on class components (like "private") and a lack of exceptions. Hopefully both will be quickly rectified.

The book itself just describes the language. The standard library or how one interfaces with Objective C and Cocoa aren't touched upon here. Both are important but probably rightly belong in different documents.

Definitely worth reading for anyone interested in Mac or iOS programming.

Updates for the Swift 2 version of the book from June 2015:

Apple has released beta versions of Swift 2 and my two main gripes (along with a bunch of other additions) have made improvements to the language. Definitely a nice step forward!
3 reviews1 follower
May 22, 2017
This book was about, well, the Swift Programming Language. It explained how to use Swift, from printing "hello world", to building full applications for iOS, MacOS, WatchOS, and tvOS. It explains conditionals, functions, error catching, property and class inheritance and mutations, and much much more. My favorite part of the book was generic class functions, because it is a very smart implementation of Swift that allows for writing clean, effective code. I would recommend this book to people who want to develop for the Apple API, which includes all major Apple software platforms. Just know, that this book is 1300 pages long, and will make you want to cry every time you read it.
Profile Image for David.
113 reviews22 followers
March 19, 2015
I enjoyed getting to know Swift. I most recently came from Ruby (RoR) and I loved how flexible Ruby is. Swift feels less flexible, and I can't imagine Swift is useful for anything other than iOS/OSX programming. You'd get more out of this book if you already know how to program in other languages or worked with web frameworks. For example, the automatic reference counting chapter at first read like a memory management chapter, and it can be a little confusing, but you do find similar foreign key behaviors in modern relational databases. You also will find the book easier to understand if you're familiar with MVC frameworks.

I'm excited to start building iOS apps.
Profile Image for Jörn Dinkla.
Author 1 book2 followers
July 3, 2015
A good introduction into the language Swift. Nice examples, good explanations. But you should know at least one other modern programming language before reading this book, like e. g. C++ 11, Groovy, Ruby, Java 8, Scala, etc.

I miss a chapter on using the language in projects, though.

The four stars are for the book, not the language Swift. Swift code is much better to read than Objective C for sure, so it is a large improvement for iOS programming. But a general programming language needs concurrency features nowadays to take advantage of multi core processors.
Profile Image for Valdir S.
64 reviews
February 26, 2020
I scanned throw the pages until the end of the "Closures" chapter and beginning of Enumerations (23.1% of the ePub).
What I can say is that the reading is straight forward but I liked most the Matt Neuburg's iOS Programming Fundamentals book. That one is well explained in a slow pace to new comers like me. So you won't have to stop your reading in order to do external research at topics that aren't clear yet.
Profile Image for Victor.
355 reviews6 followers
March 13, 2016
Its a good reference guide for the swift programming language. Good to be aware of the features available in the language.
Profile Image for Seto Elkahfi.
70 reviews20 followers
February 17, 2017
You should always refer to this book after you've found your answer on Stackoverflow.
Profile Image for Hots Hartley.
310 reviews13 followers
December 27, 2017
The book drilled too deeply into topics that wouldn't be directly useful to getting an app up & running. I also found its examples somewhat dry and impractical, and would have preferred more teaching-in-context, via Xcode projects.

The book also lacked practical explanations into key concepts where specific examples would have served well:
+ debugging: how to use built-in standard library functions like print() effectively
+ design patterns: specifically MVC, singleton, composition, decorator, responder chain, and others prevalent in OOP (only delegation receives any attention)
+ class architecture: comparing ways to declare properties without compiler stopping build
+ common protocols: Sequence, Codable, Comparable, others used as underlying standard library, or in day-to-day programming
+ equivalents of common patterns in Objective-C (from whence many learners come)

Otherwise, it browbeat some topics I consider less important to first-draft, first-pass apps:
-too much error handling (not important to getting things up & running)
-too much treatment on generics (why is this important to an app?)
-the entire language reference (overly theoretical, mostly useless)
Profile Image for Patrick Coakley.
48 reviews10 followers
May 1, 2020
I’ve only just started to really dig into Swift, and while doing some tutorials and mini-projects to get started with iOS development I decided to dedicate some time to reading through the official book, The Swift Programming Language while taking notes to better understand Swift. I think that while it’s an overall good source for learning Swift, it spends a lot of time lost in the weeds in certain parts of the book that I think could have been deferred until later, and in particular I find the pacing and organization of the book to be quite faulty, as it will often introduce some topics early on and then go over them as if you never really saw them in the earlier parts of the text. In a sense, that’s useful for understanding new topics, but it doesn’t really flow well with order of topics.

I would prefer they break this text into two parts, one for just getting situated with how Swift looks and feels, and then creating an advanced text that covers stuff like GCD and ARC in more depth instead of being relegated into a small section towards the end. Having some information on interop with C, etc, would also be of value.
Profile Image for Gerry.
186 reviews3 followers
April 23, 2022
Surprisingly well written language reference book. This isn't a tutorial to teach you how to build iOS/Mac apps but it does explain all the features of the language, and there are a lot of them!

Note I read the first half of the book which covers all the features and then skimmed through the details of the language specification which is more aimed and defining the language.

I've got a background in Objective-C and have been recently making the move to Swift for some new projects. I appreciate that the book is kept up to date with new release of the language.

Recommend if you want to program in Swift.
Profile Image for Julio Biason.
199 reviews28 followers
February 26, 2017
Let's skip the language itself for a moment and focus on the writing of the book.

The interesting bit is the first 20-or-so pages. It starts with a very simple, very succinct explanation of the language, so if you any programming language, you can just start writing Swift code picking the pointers in those pages.

Then, the real content starts: It goes very deep, explaining every point in great detail, with expanding examples that start very simple at the start of the chapter and then go increasingly going complex to explain each point.

Really interesting way to explain a language.
Profile Image for Denis Nuțiu.
62 reviews5 followers
September 1, 2023
If you want to learn Swift you can use this book paired with a code practice website like Exercism. Swift was a bit awkward at first but then I started to love it. It covers in detail pretty much everything you need to know about the language, it doesn't cover unit tests, dependency management, packaging and libraries.
Profile Image for Marcos.
133 reviews
July 20, 2020
As a BLIND computer programmer, learning Swift from a screen reader is simply too difficult. Instead, I have been able to convert my long-term knowledge of C programming into Swift. I just had to change my syntax format instead of re-inventing the wheel!
Profile Image for Thuy.
41 reviews9 followers
July 25, 2018
4.1 beta version was edited for better clarity than the original Swift 4 book.
Profile Image for Pedro Rojas.
3 reviews
May 25, 2020
The content is great and vast, especially the core of the language (generics and protocols).
It's a must for any iOS Developer.
12 reviews
February 9, 2018
If You want to learn Swift, this is the bets guide out there.
Profile Image for Till Chen.
68 reviews13 followers
April 29, 2020
Comments: The official language made by Apple! So exciting to learn another great modern programming language. the book is the cornerstone for iOS programming.
Recommended for:
Every developer interested in iOS development.
Profile Image for Đạt Anh.
1 review1 follower
September 2, 2015
Writing for Swift 2.0 Pre-release version.

Swift itself is an elegant, thoughtful and "safe" language.

As an introduction book writing in 2015, the book works best for both people new to programming or ones want to taste what it's like to be the most loved language on StackOverflow.

If you're in latter kind then the Guided Tour at the very beginning will let you "play" with the language in the attached Playground, a REPL environment also support Markdown document.

If you've just begun your programming path, then this could be the book with the most intrigue code examples. Not just some code with letters and number e.g. A, B, the book demonstrate with the real word problem where each feature of Swift fits at their best.There's the saying that programming languages are the languages to solve problems, the only different is the approaching to get solution. Introducing some unique features like optionals, type based, protocol oriented programming... through examples, the books shows a thoughtful way to deal with the long existed obscures in software development.

10/10 would recommend this book and the language to anyone interested in solving real life problems with the massive power of computing.
Profile Image for Shea.
23 reviews2 followers
December 21, 2014
As programming language references go, this one is fine. It does what it sets out to do-covers the language.

That being said, I've always been a little disappointed in how Apple doesn't do a better job of guiding people through the design patterns required of their OS, or of familiarizing people with their frameworks and general app design. Their intro-level web resources are too specific-build an app with them without thinking too hard about your design decisions, etc.

Again, this book's goal is not to teach that, but rather to cover the language. And there are a ton of resources aside from Apple on this.
Profile Image for Marc Page.
96 reviews20 followers
June 13, 2014
The language itself is pretty terrific. Objective-C capabilities but feels more like python. Finally getting rid of a lot of the C cruft, but still feels familiar.

The book, however, seemed to have a hard time pinning down the audience. There were times it felt like an intro to programming book and other times it assumed you already knew about Objective-C/Cocoa. I don't know how well a beginner to programming would do with the book, but as someone who knows several programming languages, including Objective-C, I found myself skipping pages of examples that belabored the point on simple concepts.
Profile Image for Gianni Costanzi.
200 reviews3 followers
June 21, 2014
I've read this book to get an idea about the new Swift language and I must say that I'm very satisfied of the quality of the publication and the code examples. The language seems very modern, it resembles a lot of constructs seen in scritp languages like Perl, but with the performance of a compiled language. I think that after this reading I'll subscribe to the iPhone Developer Program to start practicing with Swift with the new XCode and maybe one day I'll publish my first app on the App Store
Profile Image for Alvaro Tejada Galindo.
178 reviews5 followers
April 4, 2017
Well...this is not exactly a book...it's a manual...and it's pretty good...although I found confusing that the first section is a nice introduction and the second part is a deep dive into the introduction...

I was expecting something else...not only the main keywords or how to do "x" or "y"...I was expecting how to use graphics or things like that...well...I guess...it's not a book after all...

If you want to be introduced to Swift...this is really good...otherwise...go look for a real book...
Profile Image for grundoon.
623 reviews11 followers
March 6, 2015
Apart from a few typos (which stand out all the more in a well-edited work) and a couple of topics which could still use a bit more explanation, it's quite a good introduction to the syntax and use of Swift. There's no peek under the hood, nor does one come away with a feeling of thorough understanding (as with, say K&R), but in the context of the Apple documentation library it serves its purpose well in a very approachable tone.
Profile Image for Avihu.
39 reviews1 follower
July 26, 2014
One of the best edited programming language books. A very succinct tutorial at the beginning that allows you to get the grip of the language and then the rest of the book serves as a reference to go in depth into the language.

The reference part of the book, could have been more comprehensive. It felt too much like just reiteration of the tutorial without saying a whole lot more.
Profile Image for Elias Levy.
15 reviews
July 16, 2014
The new language, while not revolutionary, does seem like a nice combination of existing programming concepts in a format that will be easy for Objective C programmers to pick up. The incorporation of some concepts that you usually only see in dynamic languages, such as closures, is particularly nice.
8 reviews22 followers
September 4, 2015
The book has many bugs.
Also it is not possible to report bugs to Apple unless one has a paid subscription of developer account.
At many a few places the theory mentions a concept which is in contradiction with the sample code which follows.
Too sad that Apple, a company known for delivering near-flawless products has come up with such a quality drained book.
Profile Image for Михаил.
1 review
September 4, 2016
Excellent style, I wish all documentation was written like this. That said, it looks like the "Patterns" section feels like it's written by some other person. Also, there are couple of errors, but, it's irrelevant, as it is understandable that language evolves fast and in no way the book could be kept along.
Displaying 1 - 30 of 51 reviews

Can't find what you're looking for?

Get help and learn more about the design.