<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Just saw this article about IUO in Swift 3.0:<div class=""><br class=""></div><div class=""><a href="https://www.bignerdranch.com/blog/wwdc-2016-increased-safety-in-swift-3/" class="">https://www.bignerdranch.com/blog/wwdc-2016-increased-safety-in-swift-3/</a></div><div class=""><br class=""></div><div class="">I was surprised that the IUO type still exists. From what I understood,&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0054-abolish-iuo.md" class="">SE-0054</a>&nbsp;gives a clear example that:</div><div class=""><br class=""></div><div class=""><pre style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal;" class=""><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">func</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class=""> </font><span class="pl-en" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(121, 93, 163); box-sizing: border-box;">f</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class="">() </font><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">-&gt;</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class=""> </font><span class="pl-c1" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(0, 134, 179); box-sizing: border-box;">Int</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class="">! { </font><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">return</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class=""> </font><span class="pl-c1" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(0, 134, 179); box-sizing: border-box;">3</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class=""> } </font><span class="pl-c" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; box-sizing: border-box;"><font color="#969896" class="">// f: () -&gt; Int?, has IUO attribute
// ...
</font></span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">let</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class=""> x3: </font><span class="pl-c1" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(0, 134, 179); box-sizing: border-box;">Int</span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">!</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class=""> </font><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">=</span><font color="#333333" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class=""> f() </font><span class="pl-c" style="box-sizing: border-box;"><font color="#969896" class=""><font face="Consolas, Liberation Mono, Menlo, Courier, monospace" class="">// succeeds; x3: Int? = .some(3), has IUO attribute
// ...
</font></font><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">func</span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class=""> </span><span class="pl-en" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(121, 93, 163); box-sizing: border-box;">g</span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class="">() </span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">-&gt;</span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class=""> </span><span class="pl-c1" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(0, 134, 179); box-sizing: border-box;">Int</span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class="">! { </span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(167, 29, 93); box-sizing: border-box;">return</span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class=""> </span><span class="pl-c1" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(0, 134, 179); box-sizing: border-box;">nil</span><span style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; color: rgb(51, 51, 51);" class=""> } </span><span class="pl-c" style="box-sizing: border-box;"><font color="#969896" class=""><font face="Consolas, Liberation Mono, Menlo, Courier, monospace" class="">// f: () -&gt; Int?, has IUO attribute
// ...
</font></font></span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; box-sizing: border-box; color: rgb(167, 29, 93);">let</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class=""> y3: </span><span class="pl-c1" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; box-sizing: border-box; color: rgb(0, 134, 179);">Int</span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; box-sizing: border-box; color: rgb(167, 29, 93);">!</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class=""> </span><span class="pl-k" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; box-sizing: border-box; color: rgb(167, 29, 93);">=</span><span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;" class=""> g() </span><span class="pl-c" style="font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; box-sizing: border-box; color: rgb(150, 152, 150);">// succeeds; y3: Int? = .none, has IUO attribute</span></span></pre><div class=""><br class=""></div></div><div class="">x3 and y3 should be a of type Int? but trying those out in Xcode 8’s beta 1 playground show that they are still of type Int!. Did I miss something?</div><div class=""><br class=""></div><div class="">David.</div></body></html>