@marcoarment I never used to get that, now get it every time.
@iTod @owensd But certainly there is some room here for personal preference, and your example is better than others I've seen.
@iTod @owensd I'm not a fan of the extra lines at the top to declare the variables, the extra indentation, or repeating the return value.
@adamengst That is interesting that sleep helps. That wouldn't work for me because it was happening during long-running backups.
@iTod I knew about it, but when there are multiple things to clean up, try/finally is so awkward that people use goto and multiple labels.
@iTod Yes, if we're talking about runtime behavior, and we have zero-cost exceptions. But I thought we were talking about codegen.
@iTod @owensd @cananito I don't really think finally is finer-grained. Can't you achieve the same thing with defer by introducing a scope?
@iTod Haven't looked at the assembly, but I would assume yes because try/finally has to essentially catch and rethrow the exception.
@iTod Yes, mainly the syntax is much more convenient and readable. And there is the codegen difference because it’s not based on exceptions.
@iTod Keep related blocks of code together.
@_toddmc Editorial and GoodReader.
San Francisco Fonts: mjtsai.com/blog/2015/06/1…
Instacast Discontinued: mjtsai.com/blog/2015/06/1…
Swift 2 Error Handling, Continued: mjtsai.com/blog/2015/06/1…