[swift-evolution] [Draft] Abolish IUO type
brent at architechies.com
Thu Mar 17 08:53:02 CDT 2016
> 1. We have to add @implicitly_unwrapped attribute to the proposal. I hate implied "attributes", available only to compiler. The wording needs to be reformulated in terms of this attribute
> 2. We need to encourage using the attribute instead of `!`.
> 3. In the future, `!` can be removed entirely and leave only the attribute. But not for now
Disagree. As I mentioned earlier in the thread, IUOs are going to become less common on Apple platforms, but they are here to stay in Swift as a whole.
> In order to do this, I suggest finding a concise name for it. Like @IUO, but possibly more readable
I do agree that we should look for a shorter, better name. I suggest `@autounwrap`, by analogy with `@autoclosure`. Both features insert invisible syntax at usage sites to make an expression of one type appear to be an expression of a different type.
(Actually, I think that `@autoclosure` is a great analogy for this feature in many respects.)
More information about the swift-evolution