Swift: guard vs if let
问题 I have been reading about Optionals in Swift, and I have seen examples where if let is used to check if an Optional holds a value, and in case it does – do something with the unwrapped value. However, I have seen that in Swift 2.0 the keyword guard is used mostly. I wonder whether if let has been removed from Swift 2.0 or if it still possible to be used. Should I change my programs that contain if let to guard ? 回答1: if let and guard let serve similar, but distinct purposes. The "else" case