[swift-evolution] [Review] SE-0159: Fix Private Access Levels

Daniel Duan daniel at duan.org
Fri Mar 24 12:23:07 CDT 2017


> What is your evaluation of the proposal?
-1
> Is the problem being addressed significant enough to warrant a change to Swift?
Here lies the core reason for my down vote. There are currently 3541 occurrences of 'private' and 635 'fileprivate' in the code base I work on regularly. Without commenting on the merits and shortcomings of Swift 3's access control, these stats tells us 2 things:

1. This proposal is going to affect projects greatly. Not just in the sense of source incompatibility, but also the existing organization of code units given 'private' exists as of today.
2. The "complexity" many has mentioned here is largely a non-problem (we managed to use a lot of both, and I submit they are used appropriately).

The barrier for breaking change at this scale for Swift 4 should be *very* high. The proposal as-is doesn't include enough convincing argument to meet such standard.
> Does this proposal fit well with the feel and direction of Swift?
Perhaps.
> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
I'm familiar with at least Swift 2 :)
> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
Read the text of proposal, all discussions on list (current and past), and a bunch of exchanges on Twitter.

---
IMHO, access control, modules (or any type of compiler enforced namespacing), and a more advanced importing syntax are closely interconnected. Whoever proposes to change one of these should have a clear picture of how the change would affect the other two area and include it in the text. In fact, I would like to see one proposal or manifesto that address them all together. The approach of "fix it now and think about the rest later" just puts more constraints on design of "the rest", in addition to making it possible that access control needs to be tweaked even more in future versions of Swift.

> More information about the Swift evolution process is available at
> 
> https://github.com/apple/swift-evolution/blob/master/process.md
> Thank you,
> 
> -Doug
> 
> Review Manager
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170324/847b9caa/attachment.html>


More information about the swift-evolution mailing list