[swift-evolution] [Discussion] Generic protocols

Tino Heth 2th at gmx.de
Fri Dec 2 11:41:13 CST 2016


> Aren't protocols generic already using associatedtype?
Not really:
Take a look at (for example) AnyIterator… this whole layer of indirection could be removed with the requested change.
You can declare a protocol that generates Ints, Strings or whatever you like — just not in a generic way, and that's a pity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161202/624ecad3/attachment.html>


More information about the swift-evolution mailing list