Conditional Expressions in Swift

The first time I saw an if sitting on the right side of an =, I assumed it was a typo. It isn t: since Swift 5.9 an if or switch can produce a value directly instead of just branching to a block of code. These are called conditional expressions, something Kotlin, Rust, Scala, and Ruby Continue reading Conditional Expressions in Swift