init? vs. init throws: http://mjtsai.com/blog/2015/07/23/failable-init-vs-throws/ …
@optshiftk The caller can just pass NULL if it doesn’t care. Nothing else changes. With Swift, the caller has to add do-catch blocks.
-
-
@mjtsai Or the caller can prefix with `try!`. Either way, it’s a forced change at the callsite. -
@optshiftk “try!” doesn’t mean “I don’t care about the error details.” It means “I know this will succeed, so crash if it doesn’t.”
-
-
@mjtsai@optshiftk I think I like the try? suggestion, especially for something like -[NSURL checkResourceIsReachableAndReturnError:].
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Michael Tsai
Kyle S.
Jim Correia