<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><blockquote type="cite" class="">This almost seems like it could work so that it didn't even need the bracketed parts to be able to figure out the types:<br class=""><div class=""><div class=""><br class="">func anyCommonElements(lhs: T, _ rhs: U) -&gt; Bool where<br class=""> &nbsp;&nbsp;&nbsp;T : SequenceType,<br class=""> &nbsp;&nbsp;&nbsp;U : SequenceType,<br class=""> &nbsp;&nbsp;&nbsp;T.Generator.Element: Equatable,<br class=""> &nbsp;&nbsp;&nbsp;T.Generator.Element == U.Generator.Element<br class="">{}<br class=""></div></div></blockquote></div><br class=""><div class="">I'd still keep the generic arguments listed there in the brackets if only for the following reasons:</div><div class=""><br class=""></div><div class="">1. The new names get introduced (in `<font face="Menlo" style="font-size: 11px;" class="">&lt;...&gt;</font>`) before their first use. So if you happened to name one of them `<font face="Menlo" style="font-size: 11px;" class="">String</font>`, it would be clear that you didn't mean `<font face="Menlo" style="font-size: 11px;" class="">Swift.String</font>`.</div><div class=""><br class=""></div><div class="">2. It's been sometimes wished that you could explicitly specify which specialisation you want to use, e.g. when passing a function into a handler (e.g. `<font face="Menlo" style="font-size: 11px;" class=""><b class="">let operation = anyCommonElements&lt;[Int], [Int]&gt;(_:_:)</b></font>`).</div><div class=""><br class=""></div><div class="">3. How would you otherwise mention a generic type if there were no constraints for it? I think the suggested form:</div><div class=""><br class=""></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">extension Array&lt;T&gt; {</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; &nbsp; // no constraints needed (not for T above, not for U below)</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; &nbsp; <b class="">func map&lt;U&gt;(transform: T -&gt; U) -&gt; Array&lt;U&gt;</b> { ... }</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">}</font></div><div class=""><br class=""></div><div class="">reads better than this:</div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" style="font-size: 11px;" class="">extension Array&lt;T&gt; {</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; &nbsp; <b class="">// Wait what, where did U come from?</b></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">&nbsp; &nbsp; func map(transform: T -&gt; U) -&gt; Array&lt;U&gt;</font><span style="font-family: Menlo; font-size: 11px;" class="">&nbsp;</span><span style="font-family: Menlo; font-size: 11px;" class="">{ ... }</span></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">}</font></div></div><div class=""><br class=""></div><div class="">— Pyry</div></body></html>