48 ms·
Obj-C already had try / catch, it just wasn't considered idiomatic to the platform. Amazon caught a bunch of flak when they wrote an Obj-C interface to AWS and
by cellularmitosis 11y ago
Obj-C already had try / catch, it just wasn't considered idiomatic to the platform. Amazon caught a bunch of flak when they wrote an Obj-C interface to AWS and all of the error handling was try/catch instead of NSError (probably, they just line-for-line transliterated their Java interface).
- e28eta 11y ago"The standard Cocoa convention is that exceptions signal programmer error and are not intended to be recovered from. Making code exceptions-safe by default would impose severe runtime and code size penalties on code that typically does not actually care about exceptions safety. Therefore, ARC-generated code leaks by default on exceptions, which is just fine if the process is going to be immediately terminated anyway. Programs which do care about recovering from exceptions should enable the option." http://clang.llvm.org/docs/AutomaticReferenceCounting.html#exceptions http://clang.llvm.org/docs/AutomaticReferenceCounting.html#e...
- sjwright 11y agoARC was short lived and is deprecated.
- cerberusss 11y agoAm I missing something? ARC is the default when you start any ObjC-based Xcode project. It's not deprecated.