<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=""><div class="">I would assume ?! has the possibility of having an assert kill my application.</div><div class=""><br class=""></div><div class="">Is there a particular reason you are proposing this, such as a hard-to-diagnose bug?</div><div class=""><br class=""></div><div class="">-DW</div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 7, 2016, at 2:29 PM, Sébastien Blondiau 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=""><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=""><div class="">Currently, there is only one nil coalescing operator, which may return an optional value or not, depending on the second parameter. This variability can leads to unclear line of code:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="margin: 0px;" class=""><span style="color: rgb(187, 44, 162);" class="">var</span><span style="" class=""> isItOptionalOrNot = </span><font color="#4f8187" class="">value</font><span style="" class=""> ?? </span><font color="#4f8187" class="">otherValue</font></div><div style="color: rgb(79, 129, 135); margin: 0px;" class=""><br class=""></div></div><div class="">I think there should be two distinct operators:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="font-family: Helvetica; font-size: 12px;" class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span style="color: rgb(187, 44, 162);" class="">var</span><span style="" class=""> certainlyOptional = </span><font color="#4f8187" class="">value</font><span style="" class=""> </span><span style="" class="">?? </span><font color="#4f8187" class="">otherValue</font></div><div style="" class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(79, 129, 135);" class=""><span style="color: rgb(187, 44, 162);" class="">var</span><span style="" class=""> </span><span style="" class="">certainlyNotOptional</span><span style="" class=""> = </span><font color="#4f8187" class="">value</font><span style="" class=""> ?! </span><font color="#4f8187" class="">notOptionalValue</font></div></div><div style="" class=""><br class=""></div></div></div></div><div class="">In my point of view, this differentiation brings more clarity about wether the result is an optional or not.</div></div><div class=""><br class=""></div><div class="">What's your opinion?</div><div class=""><br class=""></div><div class="">--</div><div class="">Sébastien Blondiau</div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>