<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="">Hi Kurt,<div class=""><br class=""></div><div class="">I believe that this is currently being discussed in "<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160201/008649.html" class="">the bind thread</a>".<br class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;" class="">Félix</span>
</div>

<br class=""><div><blockquote type="cite" class=""><div class="">Le 1 févr. 2016 à 18:40:18, Kurt Werle via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">The pattern<div class=""><br class=""></div><div class="">someObject.callBack() { [weak self] in</div><div class="">&nbsp; if let me = self {</div><div class="">&nbsp; &nbsp; me.doSomething()</div><div class="">&nbsp; &nbsp; ...<br class=""></div><div class=""></div><div class="">&nbsp; }</div><div class="">}</div><div class=""><br class=""></div><div class="">and friends (guard, etc) are pretty common.&nbsp; I'd love to have some sugar for that - maybe "firm"</div><div class=""><br class=""></div><div class=""><div class="">someObject.callBack() { [firm self] in</div><div class="">&nbsp; self.doSomething()</div><div class="">&nbsp; ...</div><div class="">}<br class=""></div><div class=""><br class=""></div></div><div class="">where firm guarantees that the named variable[s] won't be nil - if they are, the block is skipped.</div><div class=""><br class=""></div><div class="">I think this would make the language easier to use (skipping the complexities/distinction between weak/unowned), more concise, and generally more pleasant.</div><div class=""><br class=""></div><div class="">Thoughts?</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Kurt</div><div class="">-- <br class=""><div class="gmail_signature"><a href="mailto:kurt@circlew.org" class="">kurt@CircleW.org</a><br class=""><a href="http://www.circlew.org/kurt/" target="_blank" class="">http://www.CircleW.org/kurt/</a><br class=""></div>
</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=""></div></body></html>