How does let evaluate a bool value in Swift?
swift
Solution
In addition to Bools, `if` statements can also take optionals, with the condition evaluating to whether or not the optional has a value. This particular construct is called "optional binding".
Problem
I'm reading Swift Programming Language book to get familiar Swift language as many others. It says that In an if statement, the conditional must be a Boolean expression—this means that code such as if score { ... } is an error, not an implicit comparison to zero. What i understand that condition must evaluate a bool value. Even if it's a integer value, it will not work. But what i don't understand is ``` if let convertedRank = Rank.fromRaw(3) { let threeDescription = convertedRank.simpleDescription() } ``` How does this evaluate a bool value. Normally, we use let to create a constant. As implicit conversion isn't possible in Swift, how does `let convertedRank = Rank.fromRaw(3)` evaluate a bool value which is a must for condition ?