<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">It actually removes the need of implementing a future library, with proper extension of collection types, we’ll be able to implement collect, zip, race, map, flatMap etc... most probably part of the Stdlib</div>
<div name="messageReplySection"><br />
On Aug 28, 2017, 21:25 -0400, Howard Lovatt via swift-evolution &lt;swift-evolution@swift.org&gt;, wrote:<br />
<blockquote type="cite">
<div dir="ltr">I don't really get your point ListenableFuture is a Future, so anything using ListenableFuture is using Future. As I said in the original message "... there are a lot of libraries built on top of basic futures ...".&#160;
<div><br /></div>
<div>I am pointing out that people actually use Future in Java as the building block, e.g. ListenableFuture. Therefore Swift would benefit from something comparable and if async/await doesn't lead to a better future than you can code using GCD then there is no point.</div>
</div>
<div class="gmail_extra"><br clear="all" />
<div>
<div class="gmail_signature" data-smartmail="gmail_signature">&#160; -- Howard.<br /></div>
</div>
<br />
<div class="gmail_quote">On 29 August 2017 at 07:14, Jean-Daniel <span dir="ltr">&lt;<a href="mailto:mailing@xenonium.com" target="_blank">mailing@xenonium.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"><br />
<div><span class=""></span>
<blockquote type="cite"><span class=""></span>
<div><span class="">Le 28 août 2017 à 06:14, Howard Lovatt via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; a écrit :</span></div>
<span class=""><br class="m_96354242325245755Apple-interchange-newline" /></span>
<div><span class=""></span>
<div dir="ltr"><span class="">One of the biggest incumbents in this space on the server side is Java and its concurrency is based on futures and works very well (though there are a lot of libraries built on top of basic futures).&#160;</span></div>
</div>
</blockquote>
<div><span class=""><br /></span></div>
<div>Most server side libraries don’t use Java Future as they force blocking at some point to get the future result. They instead have there own implementation that provide async completion handler (ListenableFuture, …), which result in the pattern we are trying to avoid with coroutine and async/await.&#160; This is not a very good example.</div>
<div>
<div class="h5">
<div><br /></div>
<blockquote type="cite">
<div>
<div class="gmail_extra">
<div class="gmail_quote">On 28 August 2017 at 12:35, Florent Vilmart <span dir="ltr">&lt;<a href="mailto:florent@flovilmart.com" target="_blank">florent@flovilmart.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>
<div name="messageBodySection">Adam, you’re completely right, languages as c# and JS have been through the path before, (callback, Promises , async/await) I believe Chris’s goal it to avoid building a promise implementation and go straight to a coroutines model, which is more deeply integrated with the compiler. I don’t see a particular trade off, pursuing that route, and the main benefit is that coroutines can power any asynchronous metaphor (Signals, Streams, Futures, Promises etc...) which is not true of Futures so i would tend to think that for the long run, and to maximize usability, async/await/yield would probably be the way to go.</div>
<div>
<div class="m_96354242325245755h5">
<div name="messageReplySection"><br />
On Aug 27, 2017, 22:22 -0400, Adam Kemp &lt;<a href="mailto:adam.kemp@apple.com" target="_blank">adam.kemp@apple.com</a>&gt;, wrote:<br />
<blockquote type="cite">
<div>As has been explained, futures can be built on top of async/await (or the other way around). You can have the best of both worlds. We are not losing anything by having this feature. It would be a huge improvement to have this as an option.&#160;</div>
<div id="m_96354242325245755m_-6775134399349302246AppleMailSignature"><br /></div>
<div id="m_96354242325245755m_-6775134399349302246AppleMailSignature">However, using futures correctly requires more nested closures than you have shown in your examples to avoid blocking any threads. That's why you're not seeing the advantage to async/await. You're comparing examples that have very different behaviors.</div>
<div id="m_96354242325245755m_-6775134399349302246AppleMailSignature"><br /></div>
<div id="m_96354242325245755m_-6775134399349302246AppleMailSignature">That said, I have also expressed my opinion that it is better to build async/await on top of futures rather than the other way around. I believe it is more powerful and cleaner to make async/await work with any arbitrary future type (via a protocol). The alternative (building futures on top of async/await) requires more code when the two are mixed. I very much prefer how it's done in C#, where you can freely mix the two models without having to resort to ad-hoc wrappers, and you can use async/await with any futures implementation you might already be using.</div>
<div id="m_96354242325245755m_-6775134399349302246AppleMailSignature"><br /></div>
<div id="m_96354242325245755m_-6775134399349302246AppleMailSignature">I really think we should be having more discussion about the tradeoffs between those two approaches, and I'm concerned that some of the opinions about how C# does it are not based on a clear and accurate understanding of how it actually works in that language.&#160;</div>
<div id="m_96354242325245755m_-6775134399349302246AppleMailSignature"><br />
--
<div>Adam Kemp</div>
</div>
<div><br />
On Aug 27, 2017, at 6:02 PM, Howard Lovatt &lt;<a href="mailto:howard.lovatt@gmail.com" target="_blank">howard.lovatt@gmail.com</a>&gt; wrote:<br />
<br /></div>
<blockquote type="cite">
<div>
<div dir="ltr">The async/await is very similar to the proposed Future (as I posed earlier) with regard to completion-handler code, they both re-write the imported completion-handler function using a closure, the relevant sentence from the Async Proposal is:
<div><br /></div>
<blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">"Under the hood, the compiler rewrites this code using nested closures ..."<br /></blockquote>
<br />
<div>Unlike the proposed future code the async code is not naturally parallel, in the running example the following lines from the async code are run in series, i.e. await blocks:</div>
<div><br /></div>
<div>
<pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-radius:3px;word-break:normal;color:rgb(36,41,46)">  <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">let</span> dataResource  <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">=</span> await <span class="m_96354242325245755m_-6775134399349302246gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">loadWebResource</span>(<span class="m_96354242325245755m_-6775134399349302246gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box">"</span>dataprofile.t<wbr />xt<span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box">"</span></span>)
  <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">let</span> imageResource <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">=</span> await <span class="m_96354242325245755m_-6775134399349302246gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">loadWebResource</span>(<span class="m_96354242325245755m_-6775134399349302246gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box">"</span>imagedata.dat<span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box"><wbr />"</span></span>)
</pre></div>
<div>The equivalent lines using the proposed Future:</div>
<div>
<pre style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-radius:3px;word-break:normal;color:rgb(36,41,46)">  <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">let</span> dataResource  <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">=</span> <span class="m_96354242325245755m_-6775134399349302246gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">loadWebResource</span>(<span class="m_96354242325245755m_-6775134399349302246gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box">"</span>dataprofile.t<wbr />xt<span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box">"</span></span>)
  <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">let</span> imageResource <span class="m_96354242325245755m_-6775134399349302246gmail-pl-k" style="box-sizing:border-box;color:rgb(215,58,73)">=</span> <span class="m_96354242325245755m_-6775134399349302246gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,92,197)">loadWebResource</span>(<span class="m_96354242325245755m_-6775134399349302246gmail-pl-s" style="box-sizing:border-box;color:rgb(3,47,98)"><span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box">"</span>imagedata.dat<span class="m_96354242325245755m_-6775134399349302246gmail-pl-pds" style="box-sizing:border-box"><wbr />"</span></span>)
</pre></div>
<div>Run in parallel and therefore are potentially faster assuming that resources, like cores and IO, are available.</div>
<div><br /></div>
<div>Therefore you would be better using a Future than an async, so why provide an async unless you can make a convincing argument that it allows you to write a better future?</div>
</div>
<div class="gmail_extra"><br clear="all" />
<div>
<div class="m_96354242325245755m_-6775134399349302246gmail_signature" data-smartmail="gmail_signature">&#160; -- Howard.<br /></div>
</div>
<br />
<div class="gmail_quote">On 28 August 2017 at 09:59, Adam Kemp <span dir="ltr">&lt;<a href="mailto:adam.kemp@apple.com" target="_blank">adam.kemp@apple.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 dir="auto">This example still has nested closures (to create a Future), and still relies on a synchronous get method that will block a thread. Async/await does not require blocking any threads.
<div><br /></div>
<div>I’m definitely a fan of futures, but this example isn’t even a good example of using futures. If you’re using a synchronous get method then you’re not using futures properly. They’re supposed to make it easy to avoid writing blocking code. This example just does the blocking call on some other thread.</div>
<div><br /></div>
<div>Doing it properly would show the benefits of async/await because it would require more nesting and more complex error handling. By simplifying the code you’ve made a comparison between proper asynchronous code (with async/await) and improper asynchronous code (your example).</div>
<div><br /></div>
<div>That tendency to want to just block a thread to make it easier is exactly why async/await is so valuable. You get simple code while still doing it correctly.&#160;</div>
<div><br />
<div id="m_96354242325245755m_-6775134399349302246m_-2707032511043914185AppleMailSignature">--
<div>Adam Kemp</div>
</div>
<div>
<div class="m_96354242325245755m_-6775134399349302246h5">
<div><br />
On Aug 27, 2017, at 4:00 PM, Howard Lovatt via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br />
<br /></div>
<blockquote type="cite">
<div>
<div>
<div dir="auto">The running example used in the white paper coded using a Future is:</div>
<div dir="auto"><br /></div>
<div dir="auto"><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">func processImageData1() -&gt; Future&lt;Image&gt; {</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; return AsynchronousFuture { _ -&gt; Image in</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; &#160; &#160; let dataResource &#160;= loadWebResource("dataprofile.</span><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">t<wbr />xt") // dataResource and imageResource run in parallel.</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; &#160; &#160; let imageResource = loadWebResource("imagedata.</span><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">dat<wbr />")</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; &#160; &#160; let imageTmp &#160; &#160; &#160;= decodeImage(dataResource.get ?? Resource(path: "Default data resource or prompt user"), imageResource.get ?? Resource(path: "Default image resource or prompt user"))</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; &#160; &#160; let imageResult &#160; = &#160;dewarpAndCleanupImage(</span><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">imageTm<wbr />p.get ?? Image(dataPath: "Default image or prompt user", imagePath: "Default image or prompt user"))</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; &#160; &#160; return imageResult.get ?? Image(dataPath: "Default image or prompt user", imagePath: "Default image or prompt user")</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; }</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">}</span><br /></div>
<div dir="auto"><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)"><br /></span></div>
<div dir="auto">This also avoids the pyramid of doom; the pyramid is avoided by converting continuation-handlers into either a sync or future, i.e. it is the importer that eliminates the nesting by translating the code automatically.&#160;<br /></div>
<div dir="auto"><br /></div>
<div dir="auto">This example using Future also demonstrates three advantages of Future: they are naturally parallel (dataResource and imageResource lines run in parallel), they timeout automatically (get returns nil if the Future has taken too long), and if there is a failure (for any reason including timeout) it provides a method of either detecting the failure or providing a default (get returns nil on failure).&#160;</div>
<div dir="auto"><br /></div>
<div dir="auto">There are a three of other advantages a Future has that this example doesn’t show: control over which thread the Future runs on, Futures can be cancelled, and debugging information is available.</div>
<div dir="auto"><br /></div>
<div dir="auto">You could imagine `async` as a syntax sugar for Future, e.g. the above Future example could be:</div>
<div dir="auto"><br /></div>
<div dir="auto">
<div dir="auto"><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">func processImageData1() async -&gt; Image {</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; let dataResource &#160;= loadWebResource("dataprofile.</span><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">t<wbr />xt") // dataResource and imageResource run in parallel.</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; let imageResource = loadWebResource("imagedata.</span><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">dat<wbr />")</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; let imageTmp &#160; &#160; &#160;= decodeImage(dataResource.get ?? Resource(path: "Default data resource or prompt user"), imageResource.get ?? Resource(path: "Default image resource or prompt user"))</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; let imageResult &#160; = &#160;dewarpAndCleanupImage(</span><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">imageTm<wbr />p.get ?? Image(dataPath: "Default image or prompt user", imagePath: "Default image or prompt user"))</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">&#160; &#160; return imageResult.get ?? Image(dataPath: "Default image or prompt user", imagePath: "Default image or prompt user")</span><br style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px" />
<span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">}</span><br /></div>
<div dir="auto"><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)"><br /></span></div>
<div dir="auto">Since an async is sugar for Future the async runs as soon as it is created (as soon as the underlying Future is created) and get returns an optional (also cancel and status would be still be present). Then if you want control over threads and timeout they could be arguments to async:</div>
<div dir="auto"><br /></div>
<div dir="auto"><span style="color:rgb(117,117,117);font-family:monospace,monospace;word-spacing:1px;background-color:rgb(255,255,255)">func processImageData1() async(queue: DispatchQueue.main, timeout: .seconds(5)) -&gt; Image { ... }</span><br /></div>
</div>
<br />
<div class="gmail_quote">
<div>On Sat, 26 Aug 2017 at 11:00 pm, Florent Vilmart &lt;<a href="mailto:florent@flovilmart.com" target="_blank">florent@flovilmart.com</a>&gt; wrote:<br /></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div name="messageBodySection">Howard, with async / await, the code is flat and you don’t have to unowned/weak self to prevent hideous cycles in the callbacks.<br />
Futures can’t do that</div>
</div>
<div>
<div name="messageReplySection"><br />
On Aug 26, 2017, 04:37 -0400, Goffredo Marocchi via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;, wrote:<br />
<blockquote type="cite">With both he now built in promises in Node8 as well as libraries like Bluebird there was ample time to evaluate them and convert/auto convert at times libraries that loved callback pyramids of doom when the flow grows complex into promise based chains. Converting to Promises seems magical for the simple case, but can quickly descend in hard to follow flows and hard to debug errors when you move to non trivial multi path scenarios. JS is now solving it with their implementation of async/await, but the point is that without the full picture any single solution would break horribly in real life scenarios.<br />
<br />
<div id="m_96354242325245755m_-6775134399349302246m_-2707032511043914185m_-3623957891747021796AppleMailSignature">Sent from my iPhone</div>
<div><br />
On 26 Aug 2017, at 06:27, Howard Lovatt via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br />
<br /></div>
<blockquote type="cite">
<div>
<div>My argument goes like this:
<div><br />
<div>&#160; 1. You don't need async/await to write a powerful future type; you can use the underlying threads just as well, i.e. future with async/await is no better than future without.&#160;</div>
<div><br /></div>
<div>&#160; 2. Since future is more powerful, thread control, cancel, and timeout, people should be encouraged to use this; instead because async/await are language features they will be presumed, incorrectly, to be the best way, consequently people will get into trouble with deadlocks because they don't have control.</div>
</div>
<div><br /></div>
<div>&#160; 3. async/await will require some engineering work and will at best make a mild syntax improvement and at worst lead to deadlocks, therefore they just don't carry their weight in terms of useful additions to Swift.</div>
<div><br /></div>
<div>Therefore, save some engineering effort and just provide a future library.</div>
<div><br /></div>
<div>To turn the question round another way, in two forms:</div>
<div><br /></div>
<div>&#160; 1. What can async/wait do that a future can't?</div>
<div><br /></div>
<div>&#160; 2. How will future be improved if async/await is added?</div>
<div><br /></div>
</div>
<div class="gmail_extra"><br clear="all" />
<div>
<div class="m_96354242325245755m_-6775134399349302246m_-2707032511043914185m_-3623957891747021796gmail_signature" data-smartmail="gmail_signature">&#160; -- Howard.<br /></div>
</div>
<br />
<div class="gmail_quote">On 26 August 2017 at 02:23, Joe Groff <span>&lt;<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.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><br />
<div>
<blockquote type="cite">
<div>On Aug 25, 2017, at 12:34 AM, Howard Lovatt &lt;<a href="mailto:howard.lovatt@gmail.com" target="_blank">howard.lovatt@gmail.com</a>&gt; wrote:</div>
<br class="m_96354242325245755m_-6775134399349302246m_-2707032511043914185m_-3623957891747021796m_1547456930512826529Apple-interchange-newline" />
<div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps: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"><span class="m_96354242325245755m_-6775134399349302246m_-2707032511043914185m_-3623957891747021796m_1547456930512826529Apple-converted-space">&#160;</span>In particular a future that is cancellable is more powerful that the proposed async/await.</span></div>
</blockquote>
</div>
<br /></div>
<div>It's not more powerful; the features are to some degree disjoint. You can build a Future abstraction and then use async/await to sugar code that threads computation through futures. Getting back to Jakob's example, someone (maybe the Clang importer, maybe Apple's framework developers in an overlay) will still need to build infrastructure on top of IBActions and other currently ad-hoc signalling mechanisms to integrate them into a more expressive coordination framework.</div>
<div class="m_96354242325245755m_-6775134399349302246m_-2707032511043914185m_-3623957891747021796HOEnZb"><font color="#888888"></font>
<div><font color="#888888"><br /></font></div>
<div><font color="#888888">-Joe</font></div>
</div>
</div>
</blockquote>
</div>
<br /></div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>______________________________<wbr />_________________</span><br />
<span>swift-evolution mailing list</span><br />
<span><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a></span><br />
<span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailma<wbr />n/listinfo/swift-evolution</a></span><br /></div>
</blockquote>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
<div dir="ltr">--<br /></div>
<div class="m_96354242325245755m_-6775134399349302246m_-2707032511043914185gmail_signature" data-smartmail="gmail_signature">-- Howard.</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>______________________________<wbr />_________________</span><br />
<span>swift-evolution mailing list</span><br />
<span><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a></span><br />
<span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailma<wbr />n/listinfo/swift-evolution</a></span><br /></div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br /></div>
</div>
</blockquote>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br /></div>
______________________________<wbr />_________________<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/<wbr />mailman/listinfo/swift-<wbr />evolution</a><br /></div>
</blockquote>
</div>
</div>
</div>
<br /></div>
</blockquote>
</div>
<br /></div>
_______________________________________________<br />
swift-evolution mailing list<br />
swift-evolution@swift.org<br />
https://lists.swift.org/mailman/listinfo/swift-evolution<br /></blockquote>
</div>
</body>
</html>