[swift-evolution] [Late Pitch] open/public protocols

Tino Heth 2th at gmx.de
Tue Aug 23 04:53:55 CDT 2016


> I was updating some of my libraries where I noticed that the new open access modifier made the public modifier inconsistent in one way.
> 
> Conformances to protocols is logically the same as inheritances on classes. 
> 
At least it is very, very similar, and most of the syntax is identical.
Considering the demand for "sealed" protocols, imho this inconsistency should be addressed as soon as possible.

Afair, the decision for "public as restriction of open" happened quite quickly… I guess simply adding "sealed" would have spared Swift from a huge, breaking change and avoided the protocol-issue as well.

Tino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160823/2bc84e41/attachment.html>


More information about the swift-evolution mailing list