What We’ve Learned

Optionals are tricky subject to get your head around, so it’s probably a good time to take a break and take stock of what we’ve learned so far.

This chapter has been all about working with the essential data types in Swift. We started with the numeric types—integers, floating-point numbers, and Booleans—and strings. We saw how to combine strings with the basic concatenation operator (+) and pattern substitution, and how to access their contents. Also, we went a little nuts with the Unicode support in Swift strings, but it’ll pay off if we ever want to support multiple languages, or lots of emoji.

We also played around with the different types of collections—arrays, sets, and dictionaries—and what each is particularly good for. ...

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.