SE-0217 - The "Unwrap or Die" operator

I'm not trying to push my reasoning against the inclusion of the !! operator, everything I had to say about it has been said already by others and myself in this thread. There is still one thing that makes me wonder.

Why is the new operator does not look like this ?! ?

When I created the custom unwrap or trap operator (two years ago) I used ?! since it signals that the lhs is an optional while the rhs is Never. The ?? operator has already two overloads where rhs is non-optional or optional. The proposed !! operator does not force unwrap the lhs in that same same like ?? safely unwraps lhs. Operator symmetry does not add any symantical information but rather creates a new source of confusion.


The only use-case I had for this operator was to provide a little tedious to generate but rather safely looking API when working with interface builder outlets.

1 Like