[swift-evolution] Type-based ‘private’ access within a file
brent at architechies.com
Mon Apr 3 19:01:19 CDT 2017
> On Apr 3, 2017, at 3:51 PM, Vladimir.S <svabox at gmail.com> wrote:
>>> Moreover, I think that we need *additional* access level(to current
>>> 'private'), which will mean 'can be accessed from extensions and subtypes
>>> in the same *module*' to be able to split type's conformances to number
>>> of files and don't make implementation details accessible&visible for
>>> whole module. (there was 'extensible' modifier discussed previously).
>> If we wanted to do this, I think we'd want a `protected` modifier that was
>> orthogonal to `internal` and `private` (which would probably revert to
>> `fileprivate` semantics):
> I don't think so, IMO it seems like over-complicated structure of access levels.
4. Whatever your new "internal but type-only" access level would be called
Is *not* overcomplicated? At that point, it's much simpler to think of it as four access levels + type-only or all-types.
Again, I'm not saying such a design is *good*. I'm saying it's *better than six access levels*.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution