 //:
 //: ### Introduction to Optionals
 //:
-//: Sometimes, it's useful to express the fact that a variable may contain a value or no value at all. Swift allows us to do this with **optionals**. Optionals contain **either** a value **or** `nil` (meaning "no value").
+//: Sometimes, it's useful to express the fact that a variable may contain a value or no value at all. Swift allows us to do this with **optionals**. Optionals contain **either** a value **or** `nil` (meaning "no value"). Optionals are like boxes that may have something inside, or they may have nothing inside.
 //:
-//: Some languages, such as Objective-C, allow a variable to contain `nil` without its type expressly indicating that a value may be absent. Swift is much more strict about when variables can lack a value, and this is very helpful in avoiding bugs where we think we have a value when in fact we don't. Functions can return an optional to indicate when the operation has failed or they have no value to give back to you.
+//: Some languages, like Objective-C, Python and Java, allow a variable to be set to `nil` or `null` without its type expressly indicating that a value may be absent. Swift is much more strict about when variables can lack a value, and this is very helpful in avoiding bugs where we think we have a value when in fact we don't. Functions can return an optional to indicate when the operation has failed or they have no value to give back to you.
 //:
-//: Syntactically, we express the fact that a value is of optional type by appending a question mark (?) to the type name. For example, here is how we declare a variable of type `Int?` (read as "optional `Int`"):
+//: We express the fact that a value is of optional type by putting a question mark (?) at the end of the type name. For example, here is how we declare a variable of type `Int?` (read as "optional `Int`"):
 
 var maybeAnInt: Int? = 15
 


//let intDescription = maybeAnInt.description // Value of optional type 'Int?' not unwrapped!

//: This restriction is lifted if you use a technique called **optional chaining**. Chaining allows you to try to call a method on an optional, which calls the method if the optional has a value, and returns `nil` if it does not. Chaining is performed by placing a question mark between the variable name and the dot, parenthesis, or bracket that follows it:

let optionalArray: [Int]? = [ 1, 2, 3, 4 ]
let arrayLength = optionalArray?.count
let firstElement = optionalArray?[0]

//: Placing a `?` after the name `optionalArray` will cause Swift to check whether the variable is `nil` before attempting to call `count` or subscript into the array. The types of these expressions are optionals of the same type as the return type of method (so the call to `count`, which normally produces an `Int`, produces an `Int?` in this case).
//: 
//: Set `optionalArray` to `nil` and observe how the output values change.

//: ### The Nil Coalescing Operator
//:
//: Sometimes we want to use a default value in the place of an optional when it turns out to be `nil`. For example, we might want to provide a placeholder name for an object when its own `name` property is `nil`. Swift provides a way to do this very compactly: the nil-coalescing operator (`??`). When the optional to the left of the operator has a value, that value becomes the value of the expression. When the optional is `nil`, the value of the expression is the value on the right of the operator. Let's look at an example:

let optionalString: String? = nil
let petName = optionalString ?? "Fido"

//: ### Recap
//:
//: In this Playground we have looked at some of the capabilities of optionals in Swift. Optionals are a fundamental part of Swift that allow us to be very clear about when variables contain values and when they do not. All of the rules associated with optionals can be confusing at first, but you will quickly gain an intuition by putting your knowledge into practice. The compiler will try to help you along the way, reminding you when you make mistakes.

    println("maybeAnInt does not contain a value")
}

//: Try changing the value of `maybeAnInt` again, and again take note that if it contains a value, the message indicates this and the local variable `definitelyAnInt` has the same value. If it doesn't contain a value, then `definitelyAnInt` won't be created.

//: ### Implicitly Unwrapped Optionals
//:
//: Sometimes we want to indicate that an optional will always have a value when we need to read it. For example, this happens when we separate the declaration of an optional from the first time we set its value. The first time we declare the optional, it won't have a value, but we'll set it before we use it. To support this scenario, we can declare a variable as an **implicitly unwrapped optional**. Implicitly unwrapped optionals are declared by placing an exclamation point (!) after the type to indicate that they **can** contain `nil`, but must always have a value when they are read:

var alwaysAString: String! = nil

