<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="">Hmm... I don't think this is clearer:<div class=""><br class=""></div><div class=""><font face="Menlo" class="">&nbsp; &nbsp; let fn: (Int) -&gt; (Int) -&gt; Int</font></div><div class=""><br class=""></div><div class="">I think it's much less readable and really, the () are syntactically redundant: the -&gt; is really what distinguishes this as a function.</div><div class=""><br class=""></div><div class="">Also, this would look like a error now:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">&nbsp; &nbsp; let fn: (Int) -&gt; ()</font></div></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class="">Did the user mean that it returns nothing, or did they forget the rest of the function signature?</div><div class=""><br class=""></div><div class="">I'd like to see more consistency and less redundancy, including special cases, in the language in general, but this change just seems to make it different in another way, but still not consistent throughout the language constructs.</div><div class=""><br class=""></div><div class="">-David</div><div class=""><br class=""></div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 14, 2016, at 9:57 PM, Chris Lattner 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="">We currently accept function type syntax without parentheses, like:<br class=""><br class=""> &nbsp;Int -&gt; Float<br class=""> &nbsp;String -&gt; ()<br class=""><br class="">etc. &nbsp;The original rationale aligned with the fact that we wanted to treat all functions as taking a single parameter (which was often of tuple type) and producing a tuple value (which was sometimes a tuple, in the case of void and multiple return values). &nbsp;However, we’ve long since moved on from that early design point: there are a number of things that you can only do in a parameter list now (varargs, default args, etc), implicit tuple splat has been removed, and &nbsp;the compiler has long ago stopped modeling function parameters this way. &nbsp;Beyond that, it eliminates one potential style war.<br class=""><br class="">Given all this, I think it makes sense to go for syntactic uniformity between parameter list and function types, and just require parenthesis on the argument list. &nbsp;The types above can be trivially written as:<br class=""><br class=""> &nbsp;(Int) -&gt; Float<br class=""> &nbsp;(String) -&gt; ()<br class=""><br class="">Thoughts?<br class=""><br class="">-Chris<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=""></div></div></body></html>