<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="">I think the generic typealiases Doug mentioned are a pretty good approximation of a type parameter on a protocol. After all, you should be able to do this:<div class=""><br class=""></div><div class="">typealias AnyCollection<T> = Any<Collection where .Element == T></div><div class=""><br class=""></div><div class=""><div class=""><div class="">Speaking of which, I went ahead and rewrote the proposal based on Doug's feedback. I look forward to discussing it in depth later this year/early next year. (Suggestions for a better example than the ridiculous pet hotel example at the beginning especially welcome...)</div><div class=""><br class=""></div><div class=""><a href="https://github.com/austinzheng/swift-evolution/blob/az-existentials/proposals/XXXX-enhanced-existentials.md" class="">https://github.com/austinzheng/swift-evolution/blob/az-existentials/proposals/XXXX-enhanced-existentials.md</a><br class=""><div class=""><br class=""></div><div class="">Austin</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 8, 2016, at 11:57 AM, Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div class=""><br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">FWIW, we also occasionally get "Swift should have parameterized<br class="">protocols" in the context of multiple conformances by the same<br class="">concrete type (as in things like ConvertibleTo<T> protocol).<br class=""></blockquote><br class="">I know. From the bugs I've seen it's at least 10x as many requests for<br class="">"any collection of some element type" as for any actually reason why<br class="">one would need parameterize a protocols.<br class=""></blockquote><br class="">That does, however, speak for the idea that a concise and obvious syntax<br class="">should be supported for that use-case.<br class=""><br class="">Personally, it doesn't seem ridiculous to me that some associated types<br class="">might usefully be written as type parameters on a protocol. As<br class="">Collection shows, not all associated types are equally important.<br class="">Approximately nobody wants the existential “Collection where Index ==<br class="">Int.”<br class=""><br class="">-- <br class="">Dave<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=""></div></div></blockquote></div><br class=""></div></div></div></div></body></html>