[swift-evolution] [Draft] Abolish IUO type
cwillmore at apple.com
Thu Mar 17 18:18:23 CDT 2016
> On Mar 17, 2016, at 2:29 PM, Brent Royal-Gordon <brent at architechies.com> wrote:
>>> I'm not sure this is a great idea yet. Punishing IUOs with verbose syntax may feel good, but runs the danger of making projected Swift interfaces from unaudited C and Objective-C APIs too noisy to read. Our current syntax was motivated by a strong desire to ensure that Swift interfaces remain readable, even for foreign APIs that haven't been annotated with Swift interop in mind yet.
>> I don’t think that Brent and I are suggesting that attribute syntax for IUOs should be mandatory or even recommended, merely that it should exist. That way we can talk about the feature in terms of the underlying attribute-based representation without it being some hidden, exclusively compiler-internal thing.
> That's my position as well. I will probably almost always use the `!` sugar, but when I'm thinking about the feature, and perhaps occasionally when I'm doing something kind of tricky with it, having the desugared Optional + @autounwrap representation may come in handy.
I’ve updated the proposal to more explicitly call out the need for a named decl attribute. The name is subject to further discussion, of course:
— Chris Willmore
More information about the swift-evolution