Getting default values from Dictionaries in Swift

Swift is around for some time now and introduced interesting constructions that are not widely used in other languages. One of these construction is if let statement that unwraps optionals. Let's consider following example: let apiDictionary : [String: AnyObject] = ... var name = "Unknown" if let apiName = apiDictionary["name"] as? String { name = userName } Basically our