Resolved: Insert "!" is a bad fixit

How does eliminating the fixit lead to better solutions?

I agree that encouraging people to force unwrap is not ideal, but we really want to produce actionable diagnostics, and just pointing out that the optional is not unwrapped without giving any indication of how to fix the problem is not ideal either.

Do you have a specific suggestion for what we should produce here instead?

(BTW, I have my own problem with that particular diagnostic in that we often suggest '?' when it's absolutely not applicable).

2 Likes