[swift-evolution] [Draft] Abolish IUO type
Charles Srstka
cocoadev at charlessoft.com
Thu Mar 17 23:23:11 CDT 2016
If you know something’s non-null, is there any advantage to keeping it in an implicitly-unwrapped optional instead of a normal non-optional type?
Charles
> On Mar 17, 2016, at 11:08 PM, Step C via swift-evolution <swift-evolution at swift.org> wrote:
>
> That just forces the unwrap to the base type, it doesn't turn it into an autounwrapped (or IUO).
>
> On Mar 17, 2016, at 10:26 PM, Jed Lewison via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>
>>
>>> On Mar 17, 2016, at 8:50 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>>
>>> @autounwrapped let foo = functionReturningOptional()
>>>
>>> I *believe* that, without the `@autounwrapped` attribute, there's no way to go from T? to T! without actually restating T somewhere.
>>
>>
>> I think you could express this as:
>>
>> let foo = functionReturningOptional()!
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
>> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160317/58906fb0/attachment.html>
More information about the swift-evolution
mailing list