[Proposal: 
https://github.com/apple/swift-evolution/blob/master/proposals/0119-extensions-access-modifiers.md
 ]

Hi, Adrian. I have to agree with everyone else that the proposal is unclear. 
“Remove access modifiers from extensions” sounds like you just aren’t allowed 
to write them at all, but your proposal seems to be more “access modifiers on 
extensions set a maximum level of access for members, like they do for types, 
and do not change the default”. (Plus a bit about conformances.)

I am against the latter proposal because I don’t think people should think of 
extensions as first-class entities. There is really no such thing as a “public 
extension” or a “private extension” because extensions cannot be referred to in 
the language and do not have any run-time representation. The access control 
that really matters is that of the original type, and I wouldn’t want to force 
people to repeat it here.

I am personally all right with the idea of removing access modifiers from 
extensions altogether, but I know several people like that feature a lot, and I 
don’t think it passes the criterion of being “a significant enough problem to 
warrant a change in Swift”.

Jordan

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to