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 { … }”
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
>
> <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