[swift-evolution] [Pitch] Introducing the "Unwrap or Die" operator to the standard library

Rob Mayoff mayoff at dqd.com
Thu Jun 29 14:49:12 CDT 2017


On Wed, Jun 28, 2017 at 8:49 PM, Ben Cohen via swift-evolution <
swift-evolution at swift.org> wrote:

> As the screener of a non-zero number of radars resulting from unwrapped
> nils, I would certainly appreciate more use of guard let x = x else {
> fatalError(“explanation”) } and hope that !! would encourage it.
>

Sure, but... a lot of unwrap-failed explanations are never going to be
printed because a lot of unwraps will never fail. We're going to spend time
writing those explanations, and we're going to increase the size of our
binaries. Maybe making the bug-screeners do more work is still a net win
for humanity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170629/2eef9fd6/attachment.html>


More information about the swift-evolution mailing list