[swift-evolution] [Discussion]: Deprecate !-Unwrapping of Optionals

Patrick Gili gili.patrick.r at gili-labs.com
Mon Feb 29 13:59:14 CST 2016


> On Feb 29, 2016, at 4:26 AM, Pyry Jahkola via swift-evolution <swift-evolution at swift.org> wrote:
> 
> To me, even after soon two years of Swift, it's still extremely hard to visually see where forced unwrapping happens. I do not think we should recommend unsafeUnwrap though because we'd then trade a guaranteed crash for undefined behaviour on nil, which is definitely the wrong choice at least 95% of time.
> 
> 

For starters, the interface builder generates code that uses forced unwrapping.

-Patrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160229/11b7ada2/attachment.html>


More information about the swift-evolution mailing list