<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=""><div class="">The same would work for generic types too:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">public struct Dictionary<Key, Value></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""> where Key : Hashable</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">{</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""> ...</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">}</font></div></div></div></blockquote><br class=""></div><div>And I'm not sure if people feel the same as me, but I haven't been happy with the current way generic arguments (such as <font face="Menlo" style="font-size: 11px;" class="">Key</font> and <font face="Menlo" style="font-size: 11px;" class="">Value</font> above) magically appear in type extensions but are inaccessible from anywhere else and can't be made public (`<font face="Menlo" style="font-size: 11px;" class="">public typealias Key = Key</font>` is an error).</div><br class=""><div class="">The above syntax would make it possible to use whatever identifiers locally so that it's clear what they are:</div><div class=""><br class=""></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><b class="">extension Dictionary<K, V></b></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""> // (unclear if `where K : Hashable` should be repeated here, though)</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">{</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""> ...</font></div><div class=""><span style="font-size: 11px; font-family: Menlo;" class="">}</span></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><br class=""></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><b class="">extension Array<T></b></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><b class=""> where T : Comparable</b></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">{</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""> ...</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">}</font></div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" style="font-size: 11px;" class=""><b class="">extension Array<T></b></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><b class=""> where T == String</b></font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">{</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""> ...</font></div><div class=""><font face="Menlo" style="font-size: 11px;" class="">}</font></div></div><div class=""><font face="Menlo" style="font-size: 11px;" class=""><br class=""></font></div><div class="">etc.</div><div class=""><br class=""></div><div class="">— Pyry</div></body></html>