<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="">Not sure if I like this or not, but if we do adopt it I think it should be consistent with the rule for closures. &nbsp;Following the current rule for closures, this would only apply to single expression functions. &nbsp;I think I could support that. &nbsp;<div class=""><div class=""><br class=""></div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Dec 19, 2015, at 9:53 AM, Dennis Lysenko 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=""><p dir="ltr" class="">This is very nice for writing lazy var definitions and single-line computed properties as well. +1 from me. </p>
<br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sat, Dec 19, 2015, 8:30 AM&nbsp;Craig Cruden via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" 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="color:#bb2ca2" class="">func</span> flipFunc&lt;T, U&gt;(arg1: <span style="color:#703daa" class="">T</span>, arg2: <span style="color:#703daa" class="">U</span>) -&gt; (<span style="color:#703daa" class="">U</span>, <span style="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=8CZIdLciSFC-2BO5jF-2FiP8qN7dBFsgCUZ50wdTsolcRPcCDT19zHCExDVwCV-2FhFcpRPjr3P6kLgChrmQ4ql9xOl6es9y5nM9Kt2up5MzF-2B-2BwDRfC7Ifk9lIe-2BWH2-2BC7J-2BiJHmULWG7IexHFvWzC65a7gv2FWyuXPPQJaF1X2HaoOUJrxzGgZH-2Bq89Fk9jIMfpzsKQ-2F8sAUQooA1v4NixCXNXEe-2FqJYbsrgxGM52SbqgFI-3D" alt="" width="1" height="1" border="0" style="min-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" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=eLFMrKDT8iBxZ-2Fbnk-2BZqvSchNN-2FvYXdceA0T7VxwkAeCShWDAJDAM4nsg-2FKilBJD53PT7S3V85h01QjdEMcSpJEn-2FRR6AeksIdiDu74d5-2BrFrcIVkRePbOPW1TmzeL2uPhMQJGoMQwSXsX8vGAhXhWb7bgmsxvPr1JcOXxJBFHjLrtPJmmiLUd1NoSY6EkfY1y1ilU117-2FYOpWIfXscz8a-2FqDJwl94idkci6FlZU5B8-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="">
_______________________________________________<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=""></div></div></div></body></html>