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

Matthew Johnson matthew at anandabits.com
Tue Feb 21 09:42:37 CST 2017

Sent from my iPhone

On Feb 21, 2017, at 9:18 AM, Brent Royal-Gordon <brent at architechies.com> wrote:

>> On Feb 21, 2017, at 5:36 AM, Matthew Johnson <matthew at anandabits.com> wrote:
>> This is true for lexical scoping, but I'd also like to see scoped be parameterized to take the name of a containing scope, such as a containing submodule.  This would be a powerful tool that allows sibling submodules to collaborate with each other.  It is similar to allowing extensions of different types collaborate within a file, but at a larger level of granularity.
> If I correctly understand what you seem to be suggesting, that would mean that access levels would be, ordered from narrowest access to widest, something like:
>    scoped
>    private
>    internal
>    scoped(SomeModule, OtherModule)
>    public
>    open
> Having the same keyword appear in two very different places in that list seems...less than ideal.

That's not exactly how I see it working.  I'll cover this in my take on submodules.

> -- 
> Brent Royal-Gordon
> Architechies

More information about the swift-evolution mailing list