[swift-evolution] [Pitch] merge types and protocols back together with type<Type, Protocol, ...>

Adrian Zubarev adrian.zubarev at devandartist.com
Tue May 17 12:40:34 CDT 2016


You don’t seem to be tackling the case of “A Collection whose Element type is String”. If we’re generalizing the current “protocol<>” notion, why not make it as powerful as a generic signature, with the ability to specify same-type constraints and conformances on associated types?

- Doug

Which part of the manifesto did I left out? ^^ Could you provide a quick pseudo code example?

Do you mean something like `Any<Collection where Element == String>`? I’m not sure where I should consider such a scenario, maybe at future directions?

If you’d like me to think about some specific cases I may have missed, I’d be happy if you could point the right reading (or specific section of it). 

If `Any<>` could get more powerful so let it be. :)

I’m about to rewrite a few things to match `Any<>`.

-- 
Adrian Zubarev
Sent with Airmail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160517/75c887d3/attachment.html>


More information about the swift-evolution mailing list