Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

    if (restrictiveParams[eventName] as! [String: Any])["test"] != nil
In Swift, now hopefully you wouldn't write this code but it's not entirely unlikely too. In fact the above Objective-C snippet is one of the few cases where Objective-C's forgiving `nil` behaviour doesn't save you from a crash.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: