<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I'm not going to go as far as a definitive +1, but I've definitely wanted this for var and subscript getters. If it were limited to single-expression functions, I don't see much harm. The only time there'd be a problem is if the return types matched <i class="">and</i>&nbsp;you were going to have another statement instead.</div><div class=""><br class=""></div><div class="">It feels weird for anything imperative, but I think the whole point is that there are plenty of functions which do absolutely no imperative work. I personally wouldn't want people to start using it for forwarding imperative things, though.</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">func sendHTTPRequest() -&gt; Result {</div><div class="">&nbsp; sendHTTPRequestImpl(destinationURL, body)</div><div class="">}</div></blockquote><div class=""><br class=""></div><div class="">Jordan</div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Dec 19, 2015, at 5:30 , Craig Cruden via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class="">When writing short functional code in a function it would be nice if the return keyword were an optional keyword.&nbsp;</div><div class=""><br class=""></div><div class="">Just return the last evaluated expression.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">i.e.</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp;&nbsp;<span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">func</span> flipFunc&lt;T, U&gt;(arg1: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span>, arg2: <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">U</span>) -&gt; (<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">U</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">T</span>) {</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; &nbsp; &nbsp; (arg2, arg1)</div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class="">&nbsp; &nbsp; }</div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class="">The keyword return would still be there for breaking out of a function.</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=ZEz4qHYnXhPr3bBPu-2FxP4tN3HfWKL-2FtJpqkQ0gkOVSBOoeFpYD98joqJQUtm1UfhaoB3a1f2V-2FdeoXwmglho9LQ1qV-2F-2FwMe5f-2BI-2Bn6ktiSkNKEFuFkxXVffXRAbF0xXAqwqS8iXHmtFwbni5UnJlhWTfP87yn7m1JX9URVl9myv58TicRT7m7kGdVFjeJ2S89u9hsc9iTez0usRDUlbjYhwgjkaRJ6UNttPRlG0ZC8I-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>