[swift-evolution] [swift-evolution-announce] [Review] SE-0089: Replace protocol<P1, P2> syntax with Any<P1, P2>

Jan E. Schotsman jeschot at xs4all.nl
Wed May 25 16:26:25 CDT 2016

Maybe we should adopt a Swift specific definition of existential, like

"An existential type is a type derived from Any with constraints of  
the kinds listed below:"

For example, the 5 kinds of constraint proposed by Austin Zheng.
Not very academic, but might save some discussion.

That would include the existing Protocol as type (no associated type  
or Self requirements).
Also Any<ClassName> which equals the class (which hides type  
information through automatic upcasting of subclass instances).

A narrower definition might require protocols to be involved somehow  
and the resulting type must be new (not equivalent to a class or  
struct or enum).

More information about the swift-evolution mailing list