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

Jordan Rose jordan_rose at apple.com
Thu Apr 6 19:08:16 CDT 2017

> On Apr 6, 2017, at 17:04, Brent Royal-Gordon <brent at architechies.com> wrote:
>> On Apr 6, 2017, at 11:17 AM, Jordan Rose via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> Neither, unfortunately. We accepted SE-0025, though I wish we hadn't; we named the two levels "private" and "fileprivate", though I wish we hadn't; and now there is lots of existing code relying on that, and it would be mean and capricious to force people to change that code when they migrated to Swift 4. I don't like where we ended up but Swift does not exist in a vacuum.
> Could we revert `private` to its Swift 2 meaning, but keep `fileprivate` as a compatibility alias with no plans to deprecate it until/unless we find that the keyword has nearly disappeared from use? That'd be a wart, but in the long run, I think it'd be less warty than living with an access control design we're not happy with.

Sadly, no. The conclusion from SE-0159's review was that people are actively using scoped-private, even though you and I may not be.


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

More information about the swift-evolution mailing list