<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="">On Feb 1, 2016, at 6:31 AM, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<div><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=""><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=""></div><blockquote type="cite" class=""><div class=""><font color="#5856d6" class="">func foo() {</font></div><div class=""><font color="#5856d6" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let bar: Int</font></div><div class=""><font color="#5856d6" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>withNoEscape { bar = 1 }</font></div><div class=""><font color="#5856d6" class="">}</font></div><div class=""><font color="#5856d6" class=""><br class=""></font></div><div class=""><font color="#5856d6" class="">func withNoEscape(@autoclosure(once) closure: () -&gt; ()) { /* snip */ }</font></div></blockquote></div><div class=""><br class=""></div>Looking back, I do think that there should be a way to exit from `withNoEscape` without calling the closure, so yes, throwing should imply that the closure wasn't executed. If it's possible that `foo` swallowed an error from a throwing `withNoEscape`, the compiler should assume that the variables within haven't been initialized:</div></div></blockquote><br class=""></div><div class="">I’m glad to see an @autoclosure func in this thread. &nbsp;We will want to be able to use this feature with @autoclosure in addition to @noescape.</div><div class=""><br class=""></div></div></div></blockquote><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="">As far as exiting without calling the closure, I suggest `@noescape(once?)`. &nbsp;The `?` indicates the closure may or may not be called, but <b class="">will not</b>&nbsp;be called more than once.</div></div></div></blockquote><div><br class=""></div><div>I don’t see how this is useful. &nbsp;You wouldn’t be able to initialize a value with this semantic, so it isn’t any more powerful than @noescape on the caller side.</div><div><br class=""></div><div>-Chris</div></div></body></html>