Open inotetw opened 8 months ago
type ching using is
if a as? Dog != nil { doSomeThing() }
if a is Dog { doSomeThing() } if let dog = dog as? Dog { dog.run() }
type checking using "is" is more easy to understand then type casting and check nil
I will take this one
There has been some work in https://github.com/realm/SwiftLint/pull/5561 already.
New rule request
type ching using is
Bad
Good
type checking using "is" is more easy to understand then type casting and check nil