Sorry I missed that scrolling back through the history, that proposal looks great. It doesn't look like it has<span></span> been submitted as a pull request to swift-evolution yet though.<br><br>On Sunday, 10 April 2016, Gwendal Roué <<a href="mailto:gwendal.roue@gmail.com">gwendal.roue@gmail.com</a>> 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">Felix Cloutier already wrote one: <a href="https://github.com/zneak/swift-evolution/blob/master/proposals/00xx-noescape-once.md" target="_blank">https://github.com/zneak/swift-evolution/blob/master/proposals/00xx-noescape-once.md</a><div><br></div><div>Do you think it needs to be rewritten?</div><div><br></div><div>Gwendal Roué</div><div><br><div><blockquote type="cite"><div>Le 10 avr. 2016 à 14:56, Andrew Bennett <<a href="javascript:_e(%7B%7D,'cvml','cacoyi@gmail.com');" target="_blank">cacoyi@gmail.com</a>> a écrit :</div><br><div>Hi, not beyond this thread that I have seen. I think it's worth you summarizing this thread in a formal proposal and putting it up for discussion or submitting it as a PR :)<span></span><div><div><br>On Sunday, 10 April 2016, Gwendal Roué <<a href="javascript:_e(%7B%7D,'cvml','swift-evolution@swift.org');" target="_blank">swift-evolution@swift.org</a>> 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">Hello all,<div><br></div><div>I was wondering if this topic had evolved in anyway since its original introduction.</div><div><br></div><div>@noescape(once) would still be a useful addition to the language!</div><div><br></div><div>Gwendal Roué</div><div><br></div><div><br></div><div><br><div><blockquote type="cite"><div>Le 3 févr. 2016 à 22:21, Félix Cloutier via swift-evolution <<a>swift-evolution@swift.org</a>> a écrit :</div><br><div><div style="word-wrap:break-word">I updated the proposal to address some concerns. It can be found at: <a href="https://github.com/zneak/swift-evolution/blob/master/proposals/00xx-noescape-once.md" target="_blank">https://github.com/zneak/swift-evolution/blob/master/proposals/00xx-noescape-once.md</a><div><br></div><div>Things that changed:</div><div><br></div><div><ul><li>It now says that the closure must be called on code paths where the function throws;</li><li>you can have multiple @noescape(once) parameters but they can't make assumptions from one another.</li></ul><div><br></div><div>I'm not 100% convinced that forcing a call on code paths that throw is always desirable. I've changed it because Chris's support probably means that the feature has better chances of making it, but I'm not convinced yet. If throwing allows me to return without calling the closure, I can write this:</div><div><br></div><div><div>do {</div><div><span style="white-space:pre-wrap">        </span>let foo: Int</div><div><span style="white-space:pre-wrap">        </span>try withLock(someLock, timeout: 0.5) {</div><div><span style="white-space:pre-wrap">                </span>foo = sharedThing.foo</div><div><span style="white-space:pre-wrap">        </span>}</div><div>} catch {</div><div><span style="white-space:pre-wrap">        </span>print("couldn't acquire lock fast enough")</div><div>}</div></div><div><br></div><div>which would be kind of messy if instead, the closure needed a parameter to tell whether the lock was acquired or not when it runs.</div><div><div>
<br><span style="font-family:'Lucida Grande';font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Félix</span>
</div>
<br></div></div></div>_______________________________________________<br>swift-evolution mailing list<br><a>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></div></blockquote></div></div>
</div></blockquote></div><br></div></div></blockquote>