SE-0217 - The "Unwrap or Die" operator

Fine by me. Not sure I’m sold on that exact naming/wording, but I like the general idea.

I’d also thought Chris was keen on a solution that would handle try! and as!, and spent some time exploring alternate spellings of his scoped message idea:

perform(URL(string: ":")!, assuming: "a single colon is a valid URL")

failableOperation(try! subject.value(), isSafeBecause: "subject can't error out or be disposed")

return _when([pu.asVoid(), pv.asVoid()]).map(on: nil) {
    assuming("both promises are now completed and have values") {
        (pu.value!, pv.value!)
    }
}

Again, exact naming is highly debatable, but this seems like a promising direction.

(Note that ! still does the force unwrapping in the examples above. The idea here is that you use existing ! / try! / as!, and this new function — whatever it’s called — attaches the given message to any crash that occurs within the wrapped expression. This doesn’t represent any kind error handling or recovery behavior; it’s is still just about adding a message to the failure.)

I’m fine with either direction. I also agree that there are bigger problems to solve. If one of these approaches can find general support and be an easy win, I’m all for it.