[swift-evolution] [Draft] Abolish IUO type
davesweeris at mac.com
davesweeris at mac.com
Fri Mar 18 00:58:34 CDT 2016
> On Mar 17, 2016, at 11:23 PM, Charles Srstka via swift-evolution <swift-evolution at swift.org> wrote:
>
> 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
Performance, in certain circumstances. If you’re about to pass it to something that’s expecting a `T?` or `T!` instead of just a `T`, you wouldn’t have to rewrap it first.
(Come to think of it, is there a cost to converting between `T?` and `T!`, or do they get optimized into the same thing?)
- Dave Sweeris
More information about the swift-evolution
mailing list