So one thing that I run into a lot with swift is something like the following code
let value = SomeNonOptionalValue() self.optionalValue = value doSomethingWithNonOptionalValue(value)
I basically just want to set a value to an optional property and also use it in a non-optional way immediately. My team actually blocks most(all) uses of force unwrap for pretty good reason. This is a case where force unwrapping can work but I wonder if it would be better if the compiler just took care of this.
Ideally the code would then look like
self.optionalValue = SomeNonOptionalValue() doSomethingWithNonOptionalValue(self.optionalValue)
I realize this is one line of code saving but I feel in the first case you have issues tracking that first variable. You don't know who is using it at first glance and this just seems like a quality of life fix.