Can this Swift code ``` if let person = item as? ...
# getting-started
n
Can this Swift code
Copy code
if let person = item as? Person, /* where */ person.name == "Mike" {
    // do something here with Mike
}
be written better than this one in Kotlin
Copy code
val person = item as? Person
if (person != null && person.name == "Mike") {
      // do something with Mike
}
What I’m looking for is a way to consolidate the initialization in the
if
condition. Something even PHP has as well. like
Copy code
if ($person = item ) { ... }