Some tools to make Optionals easier to use
let image = try UIImage(named: "My Image").unwrappedOrThrow()
let color = try UIColor(named: "My Color").unwrappedOrThrow(error: ColorNotFoundError())Added three new operators:
-? - If both have values, performs left - right. Otherwise, returns nil+? - If both have values, performs left + right. Otherwise, returns nil=? - If the right has a value, performs left = right. Otherwise, does nothing