While the concept of optional types, as used in the Swift language, might seem a little foreign at first, the more you use them, the more they will make sense. One of the biggest advantages with optional types is we get additional compile time checks that alert us if we forget to initialize non-optionals prior to using them.
The one thing to take away from this chapter is the concept of what optionals are. To reinforce this concept, let's review a couple of paragraphs from this chapter.
It is very important to understand that nil in Swift is very different than nil in Objective-C or other C-based languages. In Objective-C, nil is a pointer to a non-existent object; however, in Swift, nil is an absence of a value. Knowing this concept is very important in fully understanding optionals in Swift.
A variable defined as an optional can contain a valid value or it can have no value. We set a variable to a valueless state by assigning it Swift's special nil value. Optionals of any type can...