[swift-evolution] [Proposal] Revising access modifiers on extensions

Adrian Zubarev adrian.zubarev at devandartist.com
Tue Jun 28 16:04:22 CDT 2016


Laziness of typing out fileprivate on all extension members.

group is exactly what access modifier do right now on extensions.

Current access control on extensions is a mix of the access control from classes (enums and struct) and the access control from protocols (which is like groups will work). But the result isn’t great when it comes to conformances or default implementations. I already showed a few examples where it gets weird.

My opinion the the exact opposite, because I think it won’t be complex that way. People were already asking for something similar for declarations to group variables by an access modifier and reduce the boiler plate. An extra group scope won’t hurt you and it signals in a nice design where all group members will have the exact same access modifier.



-- 
Adrian Zubarev
Sent with Airmail

Am 28. Juni 2016 um 22:55:23, Jose Cheyo Jimenez (cheyo at masters3d.com) schrieb:

What does ‘lazy’ have to do with anything in this proposal? Im confused. 

I know that your desire is to make it consistent and thus clear but the reality is that 
this proposal ( and `group` ) would just make the language complex and really confusing. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160628/8bbb9ef6/attachment.html>


More information about the swift-evolution mailing list