<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="">Chris Lattner has a&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md" class="">proposal under review</a>&nbsp;on this topic.&nbsp;<div class=""><br class=""></div><div class="">milos<br class=""><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 6 Apr 2016, at 20:41, James Campbell 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 dir="ltr" class=""><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;">This was inspired from the topic about moving where clauses out of parameter lists.</div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><br class=""></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;">Certain generics get very long winded, I was wondering if we could create some sort of alias for generics.</div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><br class=""></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">func anyCommonElements &lt;T: SequenceType, U: SequenceType where T.Generator.Element: Equatable, T.Generator.Element == U.Generator.Element&gt; (lhs: T, _ rhs: U) -&gt; Bool</span><br class=""></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class=""><br class=""></span></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">could be shared across functions like so:</span></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class=""><br class=""></span></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">genericalias SequencesWithSameElements&lt;T, U&gt; = &nbsp;</span><span style="font-size:12.8px;font-family:arial,sans-serif;color:rgb(34,34,34)" class="">&lt;T: SequenceType, U: SequenceType where T.Generator.Element: Equatable, T.Generator.Element == U.Generator.Element&gt;</span></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class=""><br class=""></span></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">func anyCommonElements &lt;</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">SequencesWithSameElements</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">&gt; (lhs: T, _ rhs: U) -&gt; Bool</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class=""><br class=""></span></div><div class="gmail_default" style="font-family: arial, helvetica, sans-serif; font-size: small;"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">func == &lt;</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">SequencesWithSameElements</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class="">&gt; (lhs: T, _ rhs: U) -&gt; Bool</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px" class=""><br class=""></span></div><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><p class=""><b class=""><font color="#cc0000" class="">___________________________________</font></b></p><p class=""><b class="">James⎥</b></p><p class=""><b class=""><font color="#cc0000" class=""><a href="mailto:james@supmenow.com" target="_blank" style="cursor: url(&quot;chrome-extension://ledmjlnkdlappilhaaihfhanlpdjjalm/rockhand.png&quot;), auto;" class="">james@supmenow.com</a>⎥<a href="http://supmenow.com/" target="_blank" class="">supmenow.com</a></font></b></p><p class=""><b class=""><font size="2" class="">Sup</font></b></p><p class=""><b class=""><font size="2" class="">Runway East
</font></b></p><p class=""><b class=""><font size="2" class="">10 Finsbury Square</font></b></p><p class=""><b class=""><font size="2" class="">London</font></b></p><p class=""><b class=""><font size="2" class="">
EC2A 1AF&nbsp;</font></b></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</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=""></div></div></body></html>