swift2 - Swift: guard let vs if let - Stack Overflow The Swift Docs on Control Flow explain the idea behind that: Using a guard statement for requirements improves the readability of your code, compared to doing the same check with an if statement
What is the difference between `let` and `var` in Swift? 374 What is the difference between let and var in Apple's Swift language? In my understanding, it is a compiled language but it does not check the type at compile time It makes me confused How does the compiler know about the type error? If the compiler doesn't check the type, isn't it a problem with production environment?