<div dir="ltr">I agree and I&#39;m keeping that in mind. So when I wrote:<div>&gt; <span style="font-size:12.8px">So I also propose that T! notation is reserved for entities imported from Objective-C.</span></div><div><span style="font-size:12.8px">I meant that T! will still be used for unaudited imported APIs, not to cause the bloat of function signatures you mentioned.<br></span></div><div><span style="font-size:12.8px">No, I&#39;m not going to argue for complete removal of IUO.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">- Anton</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-10 17:59 GMT+03:00 Chris Lattner <span dir="ltr">&lt;<a href="mailto:clattner@apple.com" target="_blank">clattner@apple.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><br><div><blockquote type="cite"><div>On Apr 10, 2016, at 4:45 AM, Антон Жилин via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div dir="ltr"><div>First of all, I tried to change the original proposal to add actual @autounwrapped attribute to Swift.</div><div>Because &quot;explicit is better than implicit&quot; and consistency and so on.</div><div><br></div><div>Its authors did not pay much attention, and so I&#39;m going to create a separate proposal for that purpose.</div><div><br></div><div>Next, implicitly unwrapped optional was designed purely for bridging to Objective-C (and now C).</div><div>Notation T! that is still used in Swift code, is misleading, because it&#39;s not an actual type.</div><div><br></div><div>So I also propose that T! notation is reserved for entities imported from Objective-C.</div><div>Swift code, which needs that behaviour, such as delayed initialization, will use @autounwrapped.</div><div>It&#39;s more clear and explicit about this being a property behaviour and not a type, with all consequences.</div><div><br></div><div>What do you think?</div></div></div></blockquote><br></div></span><div>Hi Anton,</div><div><br></div><div>I agree with you in theory, and this is definitely important to discuss.  My main concern is about the readability impact that this will have on the readability of unaudited APIs.  Here are two random unaudited examples, with the rules we have today:</div><div><br></div><div>JSValue / Darwin:</div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo"><div style="margin:0px;line-height:normal"><span style="white-space:pre-wrap">        </span>func defineProperty(property: String!, descriptor: AnyObject!)</div><div><div style="margin:0px;line-height:normal;min-height:13px"><span style="white-space:pre-wrap">        </span>func strcat(_: UnsafeMutablePointer&lt;Int8&gt;!, _: UnsafePointer&lt;Int8&gt;!) -&gt; UnsafeMutablePointer&lt;Int8&gt;!</div></div><div style="color:rgb(52,149,175)"><span style="color:rgb(0,0,0)"><br></span></div></div></div><div>If we got rid of !, we’d end up with:</div><div><br></div><div><span style="font-family:Menlo;font-size:11px"><span style="white-space:pre-wrap">        </span></span><span style="font-family:Menlo;font-size:11px">func</span><span style="font-family:Menlo;font-size:11px"> </span><span style="font-family:Menlo;font-size:11px">defineProperty(property:</span><span style="font-family:Menlo;font-size:11px"> @autounwrapped </span><span style="font-family:Menlo;font-size:11px">String?, descriptor:</span><span style="font-family:Menlo;font-size:11px"> @autounwrapped </span><span style="font-family:Menlo;font-size:11px">AnyObject?)</span></div><div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px"><span style="white-space:pre-wrap">        </span>func strcat(_: @autounwrapped UnsafeMutablePointer&lt;Int8&gt;?, _: @autounwrapped UnsafePointer&lt;Int8&gt;?) -&gt; @autounwrapped UnsafeMutablePointer&lt;Int8&gt;?</div></div><div><span style="color:rgb(0,0,0)"><br></span></div><div>Here are some problems:</div><div>a) @autounwrapped ends up dominating the signature, since it is longer than many type names.</div><div><br></div><div>b) While it is appropriate for return values and properties, it isn’t the right attribute name for parameters.  There, a better name would be “@unaudited”.  When passing a parameter, there is no behavioral difference between T! and T? after all. </div><div><br></div><div>I suppose that you could argue that we should just drop annotations completely for parameters.  My concern with doing that is that it would lose the distinction between audited APIs that accept nil and do something meaningful with it, and those that have been unaudited.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Chris</div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)"><br></span></div></font></span></div></blockquote></div><br></div>