<div dir="ltr">The bind thread is certainly similar, and if something like that was adapted, I&#39;d like to see [bind self] do the same kind of thing in closure declarations that I&#39;m proposing [firm self] does - but the very odd [] syntax for closure parameters tastes pretty different to me than a lot of the rest of the language.  I don&#39;t think it&#39;s unreasonable to discuss them separately.<div><br></div><div>Thanks,<br>Kurt<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 2, 2016 at 12:02 AM, Félix Cloutier <span dir="ltr">&lt;<a href="mailto:felixcca@yahoo.ca" target="_blank">felixcca@yahoo.ca</a>&gt;</span> wrote:<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">Hi Kurt,<div><br></div><div>I believe that this is currently being discussed in &quot;<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160201/008649.html" target="_blank">the bind thread</a>&quot;.<span class="HOEnZb"><font color="#888888"><br><div>
<br><span style="color:rgb(0,0,0);font-family:&#39;Lucida Grande&#39;;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">Félix</span>
</div>

<br></font></span><div><blockquote type="cite"><div><div class="h5"><div>Le 1 févr. 2016 à 18:40:18, Kurt Werle via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; a écrit :</div><br></div></div><div><div><div class="h5"><div dir="ltr">The pattern<div><br></div><div>someObject.callBack() { [weak self] in</div><div>  if let me = self {</div><div>    me.doSomething()</div><div>    ...<br></div><div></div><div>  }</div><div>}</div><div><br></div><div>and friends (guard, etc) are pretty common.  I&#39;d love to have some sugar for that - maybe &quot;firm&quot;</div><div><br></div><div><div>someObject.callBack() { [firm self] in</div><div>  self.doSomething()</div><div>  ...</div><div>}<br></div><div><br></div></div><div>where firm guarantees that the named variable[s] won&#39;t be nil - if they are, the block is skipped.</div><div><br></div><div>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><br></div><div>Thoughts?</div><div><br></div><div>Thanks,</div><div>Kurt</div><div>-- <br><div><a href="mailto:kurt@circlew.org" target="_blank">kurt@CircleW.org</a><br><a href="http://www.circlew.org/kurt/" target="_blank">http://www.CircleW.org/kurt/</a><br></div>
</div></div></div></div><span class="">
_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></span></div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">kurt@CircleW.org<br><a href="http://www.CircleW.org/kurt/" target="_blank">http://www.CircleW.org/kurt/</a><br></div>
</div></div></div>