<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="">Here is the thread:<div class=""><br class=""></div><div class=""><a href="http://thread.gmane.org/gmane.comp.lang.swift.evolution/17142" class="">http://thread.gmane.org/gmane.comp.lang.swift.evolution/17142</a></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 23, 2016, at 6:02 PM, James Campbell &lt;<a href="mailto:james@supmenow.com" class="">james@supmenow.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;">Do we know what happened ?&nbsp;</div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><p class=""><b class=""><font color="#cc0000" class="">___________________________________</font></b></p><p class=""><b class="">James⎥Head of Trolls</b></p><p class=""><b class=""><font color="#cc0000" class=""><a href="mailto:james@supmenow.com" target="_blank" class="">james@supmenow.com</a>⎥<a href="http://supmenow.com/" target="_blank" class="">supmenow.com</a></font></b></p><p class=""><b class=""><font size="2" class="">Sup</font></b></p><p class=""><b class=""><font size="2" class="">Runway East
</font></b></p><p class=""><b class=""><font size="2" class="">10 Finsbury Square</font></b></p><p class=""><b class=""><font size="2" class="">London</font></b></p><p class=""><b class=""><font size="2" class="">
EC2A 1AF&nbsp;</font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
<br class=""><div class="gmail_quote">On 23 June 2016 at 16:42, Charlie Monroe <span dir="ltr" class="">&lt;<a href="mailto:charlie@charliemonroe.net" target="_blank" class="">charlie@charliemonroe.net</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">There was a proposal not long ago floating around that there could be if and guard that would allow something like:<div class=""><br class=""></div><div class="">guard&nbsp;myReallyLongOptionalName! else {</div><div class=""><span style="white-space:pre-wrap" class="">        </span>return</div><div class="">}</div><div class=""><br class=""></div><div class="">/// Now&nbsp;myReallyLongOptionalName is guaranteed to be nonnull</div><div class=""><br class=""></div><div class="">-- OR --</div><div class=""><br class=""></div><div class="">if&nbsp;myReallyLongOptionalName! {</div><div class=""><span style="white-space:pre-wrap" class="">        </span>doSomethingWith(myReallyLongOptionalName)</div><div class="">}</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Jun 23, 2016, at 5:36 PM, James Campbell via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class=""></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">I was wondering if people would be open to adding an unwrap method to the Optional type, &nbsp;I already have a method like this which shortens code for me.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">So this:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">let myReallyLongOptionalName: String? = "Hey"</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">if let string = myReallyLongOptionalName {</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">&nbsp; doSomethingWith(string)</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">}</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Could become"</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br class=""></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><div class="gmail_default">let myReallyLongOptionalName: String? = "Hey"</div><div class="gmail_default"><br class=""></div><div class="gmail_default">myReallyLongOptionalName.unwrap {</div><div class="gmail_default">&nbsp; doSomethingWith($0)</div><div class="gmail_default">}</div><div class="gmail_default"><br class=""></div><div class="gmail_default">The block would only be fired if myReallyLongOptionalName has a value.</div><div class=""><br class=""></div></div><div class=""><div data-smartmail="gmail_signature" class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><p class=""><b class=""><font color="#cc0000" class="">___________________________________</font></b></p><p class=""><b class="">James⎥Head of Trolls</b></p><p class=""><b class=""><font color="#cc0000" class=""><a href="mailto:james@supmenow.com" target="_blank" class="">james@supmenow.com</a>⎥<a href="http://supmenow.com/" target="_blank" class="">supmenow.com</a></font></b></p><p class=""><b class=""><font size="2" class="">Sup</font></b></p><p class=""><b class=""><font size="2" class="">Runway East
</font></b></p><p class=""><b class=""><font size="2" class="">10 Finsbury Square</font></b></p><p class=""><b class=""><font size="2" class="">London</font></b></p><p class=""><b class=""><font size="2" class="">
EC2A 1AF&nbsp;</font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>