Some really cool ideas. This is a lot of fun.
As @Jon_Shier points out, there is not really a precedent for or* operations so it is probably not a very good name! Sorry! On the other hand, a throwing
Optional seems very natural to me, and if you said its been there since Swift 2, I would have believed you.
unwrapped() feels like such an obvious and natural abstraction to me now, I think it can (and should?) be considered independently of making throws a bottom type that can be used with
??. If I understand the issues correctly, I don't think that having this unwrapped function walls off this improvement to the type checker as a future feature, and it addresses an existential, day-to-day problem.
I like the nested name
Missing error the best. Great observation from Rob @mayoff that it's going to be generic and harder to catch. I kind of feel like in this case where you want to be real specific, though, the caller should be handling the optional differently, either with a tried and true
guard let or throwing a custom, remapped error that is more "catchable." Fortunately, though, you can still catch it if you have to.
The overload solution from @noremac is pretty great because it makes errors immediately useful to those just starting out. It encourages playgrounders to embrace error handling instead of try! or compact mapping away errors the name of, "hey, this is just test playground code" only to have it copy and pasted into production code and then shipped!