<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 3, 2017, at 12:54 PM, Thorsten Seitz via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: SourceCodePro-Regular; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">The difference is that IUOs are marked by a "!“ whereas dynamic member lookups look just like normal member lookups but unlike them can fail.</span></div></blockquote></div><br class=""><div class="">We don't even need to bring up IUOs for it to be possible to write code that can fail without visibility at the call site. A contrived example:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="color: #ba2da2" class="">func</span> convertToInt(<span style="color: #ba2da2" class="">_</span> val: <span style="color: #703daa" class="">String</span>) -> <span style="color: #703daa" class="">Int</span> {</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""> <span style="color: #ba2da2" class="">return</span> <span style="color: #703daa" class="">Int</span>(val)!</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">}</div><div style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: Helvetica; min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(209, 47, 27);" class=""><span style="color: #ba2da2" class="">let</span><span style="color: #000000" class=""> val = </span>"something"</div><div style="margin: 0px; font-stretch: normal; line-height: normal; color: rgb(0, 132, 0);" class="">// ... a bunch of code</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="color: rgb(186, 45, 162);" class="">let</span> i = <span style="color: rgb(49, 89, 93);" class="">convertToInt</span>(<span style="color: rgb(79, 129, 135);" class="">val</span>) // <b style="color: rgb(49, 89, 93); font-size: 11px;" class="">Fatal error: Unexpectedly found nil while unwrapping an Optional value</b></div></div></div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; color: rgb(49, 89, 93); background-color: rgb(255, 255, 255);" class=""><span style="color: #000000" class=""><br class=""></span></div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);" class="">This is trivially easy to do, and has been since Swift 1, but it's not something that has become a widespread issue.</div><div style="margin: 0px; font-stretch: normal; font-size: 13px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><br class=""></div></body></html>