<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=""><div class="">Would this also affect the syntax for naming closure arguments? For example, would this (taken from "The Swift Programming Language (Swift 2.2)”):</div><div class=""><ol class="code-lines" style="border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; counter-reset: li 0; line-height: 1.6em; list-style: none; font-family: Helvetica, Arial, sans-serif;"><li style="border-width: 0px 0px 0px 18px; border-left-style: solid; border-left-color: transparent; margin: 0px; outline: 0px; padding: 0px 10px 0px 0px; vertical-align: baseline; text-indent: -13px; white-space: pre-wrap; color: rgb(255, 255, 255); content: ' '; list-style-type: none;" class=""><code class="code-voice" style="border: 0px; font-size: 0.85em; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 0); font-family: Menlo, monospace; word-wrap: break-word;"><span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">  reversed</span> = <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">names</span>.<span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">sort</span>( { <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s1</span>, <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s2</span> <span class="kt" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(170, 51, 145);">in</span> <span class="kt" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(170, 51, 145);">return</span> <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s1</span> &gt; <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s2</span> } )</code></li></ol></div><div class="">have to be written like this:</div><div class=""><ol class="code-lines" style="border: 0px; font-size: 14px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; counter-reset: li 0; line-height: 1.6em; list-style: none; font-family: Helvetica, Arial, sans-serif;"><li style="border-width: 0px 0px 0px 18px; border-left-style: solid; border-left-color: transparent; margin: 0px; outline: 0px; padding: 0px 10px 0px 0px; vertical-align: baseline; text-indent: -13px; white-space: pre-wrap; color: rgb(255, 255, 255); content: ' '; list-style-type: none;" class=""><code class="code-voice" style="border: 0px; font-size: 0.85em; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(0, 0, 0); font-family: Menlo, monospace; word-wrap: break-word;"><span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">  reversed</span> = <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">names</span>.<span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">sort</span>( { (<span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s1</span>, <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s2</span>) <span class="kt" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(170, 51, 145);">in</span> <span class="kt" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(170, 51, 145);">return</span> <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s1</span> &gt; <span class="vc" style="border: 0px; font-size: 11.899999618530273px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(63, 110, 116);">s2</span> } )</code></li></ol></div><div class="">or is that a different syntax?</div><div class=""><br class=""></div><div class="">As a developer focused on _writing_ and _reading_ code like this, I don’t see the real benefits of this change. It only feels natural to me that I would be able to omit the parentheses when there is only one type, but that I would need them to group multiple arguments or to label arguments.</div><div class=""><br class=""></div><div class="">That said, I don’t feel strongly about it and the work of transitioning our code would be minimal. If this change provides other engineering benefits that aren’t noticeable on the surface, then I’m positive to the change for those reasons.</div><div class=""><br class=""></div><div class="">- David</div>&nbsp;<br class=""><div><blockquote type="cite" class=""><div class="">On 19 Apr 2016, at 16:59, Sean Heber 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=""><div class="">For what it’s worth, I searched my Swift code and didn’t find a single instance where I did *not* use the parens - even for single-argument functions. Until this conversation came up, I don’t recall if it ever even occurred to me that I *could* leave the parentheses out!<br class=""><br class="">l8r<br class="">Sean<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Apr 19, 2016, at 9:49 AM, Erica Sadun via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class=""><br class="">On Apr 18, 2016, at 4:31 PM, Dave Abrahams via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""><br class="">on Fri Apr 15 2016, Brent Royal-Gordon &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class="">Given all this, I think it makes sense to go for syntactic<br class="">uniformity between parameter list and function types, and just<br class="">require parenthesis on the argument list. &nbsp;The types above can be<br class="">trivially written as:<br class=""><br class="">(Int) -&gt; Float<br class="">(String) -&gt; ()<br class=""><br class="">Thoughts?<br class=""></blockquote><br class="">While it's technically correct, I agree with John's assessment that<br class="">this is "fussy". `T -&gt; U` doesn't confuse people <br class=""></blockquote><br class="">Do we have any data on this (in either direction)?<br class=""><br class="">Personally, it has always seemed obvious that T -&gt; U being a function<br class="">type would be quite novel to some people, considering the number of<br class="">times I've seen in Haskell texts that (surprise!) you don't need<br class="">parentheses to invoke functions. &nbsp;I guess those are invocations and<br class="">we're talking about declarations here, but declaration-follows-use is a<br class="">kind of principle the language tries to uphold.<br class=""><br class="">But that's just intuition. &nbsp;Data would be very interesting.<br class=""></blockquote><br class="">Apart from intuition and confusion, parentheses are used at call sites<br class="">and declarations. It seems out of line that they can be removed in types <br class="">but only in one degenerate case.<br class=""><br class="">This goes against the Swift core design goal of consistency.<br class=""><br class="">-- E<br class=""><br 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=""></blockquote><br 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></div></blockquote></div><br class=""></body></html>