<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=""><br class=""><div><blockquote type="cite" class=""><div class="">Le 1 févr. 2016 à 18:29, Félix Cloutier via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="">@Gwendal: that's one solution. A third solution would be to enforce that @noescape(once) parameters are executed in parameter order.</div><div class=""><br class=""></div><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Do you have any example of UIKit where a function accepts two closures that could reasonably be marked @noescape(once)?</span><br class=""></div></div></blockquote><br class=""></div><div>No Félix, no example in UIKit itself. I was thinking of higher-order applications or library functions that wrap any stateful API. A very artificial example involving UIKit :</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>func f(@noescape(once) closure1: () -&gt; (), @noescape(once) closure2: () -&gt; (), @noescape(once) closure3: () -&gt; ()) {</div><div><span class="Apple-tab-span" style="white-space: pre;">                </span>closure1()</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>tableView.beginUpdates()</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>closure2()</div><div><span class="Apple-tab-span" style="white-space: pre;">                </span>tableView.endUpdates()</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>closure3()</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br class=""></div><div>So unless it would be too complex to implement, I would support letting the compiler accept several once closures, without requiring any execution order, and without double-guessing the needs of the developer.</div><div><br class=""></div><div>Gwendal</div></body></html>