<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 12, 2016 at 10:34 AM, Erica Sadun <span dir="ltr">&lt;<a href="mailto:erica@ericasadun.com" target="_blank">erica@ericasadun.com</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"><div>How about </div><div><br></div><div><font face="Menlo">guard reconstitute self else { return }</font></div></div></blockquote><div><br></div><div>I like the idea behind this but I feel like a line inside the block can&#39;t really dictate whether self is captured weakly or not. Unless your saying put this in the bracket part?</div><div><br></div><div>[guard reconstitute self] ? That works for me.</div><div><br></div><div><br></div><div>PS: I got here from your blog post, thanks!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><font face="Palatino-Roman">-- E</font></div><br><div><blockquote type="cite"><div><div class="h5"><div>On Feb 12, 2016, at 11:28 AM, Jason Gregori via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br></div></div><div><div><div class="h5"><div dir="ltr"><span style="font-size:13px">I like Kenny and Kurt&#39;s points about handling the majority case and keeping the syntax simpler.</span><br style="font-size:13px"><div style="font-size:13px"><br></div><div style="font-size:13px">I feel like most of the time I want to break a retain cycle is for a completion block which returns void. Can we just handle that case and get rid of the else?<br></div><div style="font-size:13px"><br></div><div style="font-size:13px">Also, I don&#39;t think [guard self] is self explanatory enough. I think weak should be in there so it&#39;s much more obvious you are doing the weak/strong dance with self, otherwise it looks like you are guarding against a regular optional being nil.</div><div style="font-size:13px"><br></div><div style="font-size:13px">So:</div><div style="font-size:13px"><br></div><div style="font-size:13px">[guard weak self, other]</div></div></div></div>
_______________________________________________<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></div></blockquote></div><br></div></blockquote></div><br></div></div>