<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="">Very much in favor of this solution (removing the standalone let self = self!). Its does not introduce any new syntax, its semantics is very obvious, its explicit, and its also much more flexible than the alternative guard capture list proposal while keeping magic to the necessary minimum.&nbsp;<div class=""><br class=""></div><div class="">— Taras<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 19 Feb 2016, at 20:40, Evan Maloney via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; 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=""><blockquote type="cite" class=""><div class="">On Feb 19, 2016, at 2:30 PM, plx via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="highlight highlight-source-swift" style="box-sizing: border-box; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);"><pre style="box-sizing: border-box; overflow: auto; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; padding: 16px; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; word-break: normal;" class="">networkRequest<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">.</span>fetchData() { [<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">weak</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">self</span>] result <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">in</span>
    <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">guard</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">self</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">!=</span> <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">nil</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">else</span> { <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">return</span> }

    <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">let</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">self</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">=</span> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">self</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">!</span>
</pre></div></div></div></div></blockquote><div class="">…isn’t there a race condition in this example (admittedly an *unlikely* one in most settings, but still…)?</div></div></div></div></blockquote></div><br class=""><div class="">Yes, that's a good point.</div><div class=""><br class=""></div><div class="">Now that I think about it, allowing a standalone `let self =` could never be implemented in a way *guaranteed* to avoid a race condition, so perhaps I should remove it from the proposal altogether.</div><div class=""><br class=""></div><div class="">When I incorporate the next round of feedback, I'll rework the proposal to indicate that it can only be used with `if let` or `guard let`.</div><div class=""><br class=""></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></div></body></html>