Sent from my iPad

> On Jan 3, 2016, at 10:53 AM, David Waite via swift-evolution 
> <[email protected]> wrote:
> 
> I like this, and had considered proposing something similar.
> 
> Points:
> I would have chose to leave protocol to mean the dynamically dispatch-able 
> type declaration, as that is what it indicates in Objective-C. Your proposal 
> would cause every Objective-C protocol to now be considered an interface in 
> Swift terms.
> 
> Some discussion on this list makes me think that you might instead have a 
> modifier for declaring statically dispatched, existential protocols - e.g. 
> “existential protocol SequenceType { … }”

The problem with *requiring* distinct syntax for protocols that are intended to 
be used as existential a is that it is a stated goal to expand the kinds of 
protocols which can be used as existentials.  In other words, the set of 
protocols that can be used as existentials is a moving target that is likely to 
grow substantially in the future.

I would be comfortable with some kind of optional assertion that a protocol can 
be used as an existential but probably not comfortable with anything more than 
that.

> 
> Also, note not all usage of Self need be disallowed in dynamically 
> dispatch-able types today:
> 
> protocol Test { 
>      func foo() -> Self 
> }    
> 
> var t:Test? // legal, I assume on purpose due to the covariance of the return 
> type
> 
> -DW
> 
>> On Jan 3, 2016, at 7:48 AM, Антон Жилин via swift-evolution 
>> <[email protected]> wrote:
>> 
>> Introduction of interfaces will clean up the current blend of static and 
>> dynamic protocols, and solve at least three popular issues.
>> Please see:
>> https://github.com/Anton3/swift-evolution/blob/master/proposals/0000-introducing-interfaces.md
>>  _______________________________________________
>> swift-evolution mailing list
>> [email protected]
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to