<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">Thinking about it, wouldn't hiding the implementation of Future&lt;T&gt; have the advantage of preventing people from returning Futures from functions ?</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69); min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">This would allow to write this:</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">func foo() async -&gt; Future&lt;SomeType&gt; {</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let futureValue = Future { await someOtherFunc() }</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>doSomethingElse()</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>return futureValue</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">}</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69); min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">As this:</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">func foo() async -&gt; SomeType {</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let futureValue = async someOtherFunc()</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>doSomethingElse()</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>return futureValue</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">}</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69); min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">Internally compiler would add an await at return:</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">func foo() async -&gt; SomeType {</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let futureValue = async someOtherFunc()</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>doSomethingElse()</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>return await futureValue</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">}</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">With this syntax it would seem useless to return Future from a function ! Wouldn't it also avoid to skip some thread safety checks that would be required by Future being publicly implemented as a class ?</div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class=""><br class=""></div><div style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(69, 69, 69);" class="">What do you think about it ?</div></body></html>