Let's fix `if let` syntax

I more-or-less hate all of these spellings. Simplest and clearest would be comparison to nil unwraps an optional in the following scope.

if myViewController != nil {
// it's unwrapped in here
}

There's no problem with naming/renaming of the variable. There's no oddball syntax or new keywords. I've wondered why this doesn't work since my first day with swift. What could be simpler?

9 Likes