Assignments in conditionals can be handy handy, but I think it's better when there's a keyword for it. The Rust/Swift `if let` syntax is pretty nice for this.
if let userID = 0 {}
vs if userID == 0 {}
The let syntax makes this error more obvious.