[swift-evolution] [Draft] Fix Private Access Levels

Jonathan Hull jhull at gbis.com
Wed Feb 22 11:08:52 CST 2017

> On Feb 22, 2017, at 8:26 AM, Joanna Carter <joanna at carterconsulting.org.uk> wrote:
>> From my point of view the "underlying issues with access" is that we have no well-designed scoped access modifiers in addition to module/file access levels. I do think they are two axis of the access control/documentation, and should work together to aim the better code quality and 'simplicity' in all meanings.
> I have started a new thread "Analysis of existing scopes" in the hope of trying to outline more precisely what we currently have in terms of scopes and where I see inconsistencies/problems.

Thanks for doing that.  I think it is useful to step back and look from a different angle from time to time.

> I hope it is of more use than noise :-)
> From first analysis, I have found that we may actually need both private *and* fileprivate ???!!!

I think the question is: Do we actually need (scoped) private?  If we do, then we still need fileprivate.  If not, then we could get away with just ‘fileprivate’ which we would spell ‘private’.

A third option is just to have ‘private' mean private to the current submodule (which would be the file unless otherwise specified).  Then, assuming we don’t need (scoped) private, we wouldn’t need fileprivate either…

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

More information about the swift-evolution mailing list