Chapter 3Swift with Style

In the previous chapter, we explored the basics of Swift: the type system, control flow, optionals, and so on. And, assuming Swift isn’t your first programming language, you’ve probably guessed the next step is combining these simple pieces together into more complex, more capable, and more interesting constructs. While that is what we’re going to do, it’s not as straightforward as you might think.

Swift is a remarkably flexible language, one that takes its inspiration from a number of different sources. It’s true to both the object-oriented nature of Objective-C and to new ideas about design, elegance, and maintainability in functional programming languages. You can write Swift like Objective-C, like C, like Java, ...

Get iOS 9 SDK Development 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.