<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="">On Jun 28, 2017, at 6:43 PM, Alan Westbrook via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 28, 2017, at 5:27 PM, Xiaodi Wu 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: Helvetica; font-size: 12px; 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="">In the initial example, repeated here in largely identical form, the desired comment is "array must be non-empty." In what way does that provide more information than a bare `!`?</span></div></blockquote></div><br class=""><div class="">I’m going to second this sentiment with the feeling that the message is seemingly redundant. It feels akin to the comment in this line of code:</div><div class=""><br class=""></div><div class=""> l<font face="Andale Mono" class="">et value = 1 // This value is set to 1</font></div><div class=""><font face="Andale Mono" class=""><br class=""></font></div><div class="">On an error, one gets the trap with the optional unwrapped message, and goes to the code where they see what is being forced by assumption.</div><div class=""><br class=""></div><div class="">Does the message spelling out the code in natural language help?</div><div class=""><br class=""></div><div class="">Alan</div></div></div></blockquote><br class=""></div><div>I have replied to another email but will repeat the point here: <span style="font-family: Palatino-Roman;" class="">The proposed `!!` operator differs from the direct use of `!` in that it explains a fact known to hold true, allowing the lhs to safely unwrap. </span></div><div><span style="font-family: Palatino-Roman;" class=""><br class=""></span></div><div><font face="Palatino-Roman" class="">The alternatives are:</font></div><div><font face="Palatino-Roman" class=""><br class=""></font></div><div><font face="Palatino-Roman" class="">* forced unwrap -- comments do not transfer to runtime, which leads coders to use:</font></div><div><font face="Palatino-Roman" class="">* using guard with fatalError -- the !! operator provides an elegant sugared shortcut for this common code</font></div><div><font face="Palatino-Roman" class=""><br class=""></font></div><div><font face="Palatino-Roman" class="">-- E</font></div><div><font face="Palatino-Roman" class=""><br class=""></font></div><br class=""></body></html>