[swift-evolution] [swift-evolution-announce] [Review] SE-0159: Fix Private Access Levels

Charles Srstka cocoadev at charlessoft.com
Mon Mar 20 22:26:37 CDT 2017


> On Mar 20, 2017, at 9:33 PM, Greg Parker via swift-evolution <swift-evolution at swift.org> wrote:
> 
> 
>> On Mar 20, 2017, at 4:54 PM, Douglas Gregor <dgregor at apple.com <mailto:dgregor at apple.com>> wrote:
>> 
>> Hello Swift community,
>> 
>> The review of SE-0159 "Fix Private Access Levels" begins now and runs through March 27, 2017. The proposal is available here:
>> 
>> https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md <https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md>
> -1. I yield the remainder of my time to Drew Crawford who satisfactorily explained my concerns.

I’ll second the -1 and the reference to Drew’s post, with the added comment that the concern with extensions could be easily solved simply by giving extensions access to private members of the extended type as long as those extensions are in the same module/submodule (or file, if you prefer, but I don’t). This would probably eliminate almost all of the use cases for fileprivate, as well as freeing us from the sometimes clumsy situation where we’re rather artificially forced to use files as a scope, instead enabling us to organize code into files as is appropriate for the project.

Charles

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170320/6bc38ce1/attachment.html>


More information about the swift-evolution mailing list