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

Brent Royal-Gordon brent at architechies.com
Tue May 17 01:55:03 CDT 2016


> But don't you mean the union type of all possible Collection types when you write Any<Collection>?

No, I mean "an existential capable of holding any Collection".

If I write Any<Equatable, Collection>, I mean "an existential capable of holding any Equatable Collection".

If I write Any<UITableViewCell, CounterDisplaying>, I mean "an existential capable of holding any CounterDisplaying UITableViewCell".

If I write Any<Collection where .Element: Equatable>, I mean "an existential capable of holding any Collection with an Equatable Element".

If I write Any<class>, I mean "An existential capable of holding any class instance".

If I write Any, I mean "An existential capable of holding anything".

Union types have nothing to do with it.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list