[swift-evolution] Type-based ‘private’ access within a file

Brent Royal-Gordon brent at architechies.com
Tue Apr 4 21:00:20 CDT 2017


> On Apr 4, 2017, at 6:45 PM, Brent Royal-Gordon <brent at architechies.com> wrote:
> 
> Access control is a tar pit; let's not drown in it.


Amending this: The precise boundaries of lower-than-`fileprivate` levels of access control—what we're discussing here—are a tar pit. There are gains to be made by removing an access control level, but that's not an option. There are gains to be made between `fileprivate` and `internal`, and between `internal` and `public`, but those are not what we're considering here. There *may* be gains to be made by a ` `private` -> `scoped`/`fileprivate` -> `private` switch (I'm skeptical, but I can see the argument), but that's not in the offing, either.

Fiddling with the precise boundaries of `private` will have three effects:

	1. Some users will find it more useful.

	2. Other users will find it less useful.

	3. *Every* user, happy or not, will have to re-learn what `private` does for the second time in two years.

It does not seem possible to determine whether #1 or #2 will predominate. This is different from most proposals we consider: We are pretty confident that adopting key paths or making `String` into a `Collection` will be more helpful than harmful, but I don't think that's true of fiddling with `private`. And #3 is a certain, significant, and unambiguously negative effect.

-- 
Brent Royal-Gordon
Architechies

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


More information about the swift-evolution mailing list