@mjtsai Just saw that. On second thoughts, it's better NOT to use implicit unwrapping here, coz we need to check for nil. if-let is better.
-
-
@roopeshchander Choice between compiler help with safety and avoiding extra indentation.0 replies 0 retweets 0 likes -
@mjtsai We can't avoid the extra indentation because `if` is unavoidable, right?0 replies 0 retweets 0 likes -
@roopeshchander Right. That's why I think there needs to be a better way to do this in Swift.0 replies 0 retweets 0 likes -
0 replies 0 retweets 0 likes
-
@roopeshchander My main issue is that there's going to be 3+ lines of error-handling code for each line that does something that might fail.0 replies 0 retweets 0 likes -
@mjtsai Stepping back, I think it's weird that an NSString's init() can fail. Ideally, there would only be a class method in Swift, I think.0 replies 0 retweets 0 likes -
@mjtsai Because, unlike Obj-C, Swift init() doesn't return the self object.0 replies 0 retweets 0 likes -
@roopeshchander Yeah. Will be interesting to see how this evolves in Swift. Not sure I like the current way of wrapping in class methods.0 replies 0 retweets 0 likes -
@mjtsai Beta 4: "Swift does not support object initializers that fail by returning null." (Workaround: factory method.)0 replies 0 retweets 0 likes
@roopeshchander I think that’s what it said in precious versions, too. Hope they come up with something.
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.
Roopesh Chander
Michael Tsai