[swift-evolution] [Discussion]: Deprecate !-Unwrapping of Optionals
andrey at tarantsov.com
Tue Mar 1 23:30:02 CST 2016
My UI code has hundreds of these force-unwraps, mostly on resource
access like UIImage(named: "something")!, to catch naming mistakes and
the like. Making it a method will increase the visual noise
significantly, and I can't even imagine using let's for this.
In general, I consider ! an assertion, and definitely NOT a code smell.
There are many cases where generic code may legitimately return nil, but
I as a developer know that it will never happen in my particular case.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution