<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 Sep 3, 2017, at 5:01 PM, Jonathan Hull &lt;<a href="mailto:jhull@gbis.com" class="">jhull@gbis.com</a>&gt; wrote:<div><blockquote type="cite" class=""><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 Sep 3, 2017, at 9:04 AM, Chris Lattner 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="">On Sep 3, 2017, at 4:00 AM, David Hart &lt;<a href="mailto:david@hartbit.com" class="">david@hartbit.com</a>&gt; wrote:</div><div class=""><div class="Singleton" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: 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-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="">Please don’t read too much into the beginAsync API. &nbsp;It is merely a strawman, and intended to be a low-level API that higher level abstractions (like a decent futures API) can be built on top of. &nbsp;I think it is important to have some sort of primitive low-level API that is independent of higher level abstractions like Futures.<br class=""><br class="">This is all a way of saying “yes, having something like you propose makes sense” but that it should be part of the Futures API, which is outside the scope of the async/await proposal.<br class=""></div></div></blockquote><div 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; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div 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; -webkit-text-stroke-width: 0px;" class="">But it would be nice for all high-level APIs that conform to a<span class="Apple-converted-space">&nbsp;</span><b class="">Awaitable</b><span class="Apple-converted-space">&nbsp;</span>protocol to be used with<span class="Apple-converted-space">&nbsp;</span><b class="">await</b><span class="Apple-converted-space">&nbsp;</span>without having to reach for a<span class="Apple-converted-space">&nbsp;</span><b class="">get</b><span class="Apple-converted-space">&nbsp;</span>property or something similar everytime.</div></div></div></div></blockquote><br class=""></div><div class="">The futures API that is outlined in the proposal is just an example, it isn’t a concrete pitch for a specific API. &nbsp;There are a bunch of improvements that can (and should) be made to it, it is just that a futures API should be the subject of a follow-on proposal to the basic async/await mechanics.</div></div></div></blockquote><br class=""></div><div class="">Would it be possible to have the manifesto be a series of proposals then? &nbsp;I really think it is important for us to look at how all of these things fit together. &nbsp;I agree that async/await should come first, but looking at how concrete things like Futures would work may help to inform the design of async/await. &nbsp;We should do the back-propigation in our design before anything is locked in…</div></div></div></blockquote><div><br class=""></div><div>Sure, that would be great. &nbsp;I don’t have time to write up a futures proposal myself, but I’d be happy to contribute editorial advice to someone (or some group) who wants to do so.</div><br 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="">The thing I would most like to see as a quick follow-on to async/await is the ability to use the ‘async’ keyword to defer ‘await’.&nbsp;</div></div></div></blockquote></div><br class=""><div class="">This keeps coming up, and is certainly possible (within the scope of the swift grammar) but a decision like this should be driven by a specific cost/benefit tradeoff. &nbsp;That tradeoff decision can only be made when the futures API has a specific proposal that people generally agree to. &nbsp;</div><div class=""><br class=""></div><div class="">Because of this, I think that the Futures proposal should be a *library only* proposal on top of the async/await language stuff, and them mention something like “async foo()” as a possible future extension - the subject of its own proposal.</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""></div></body></html>