[swift-evolution] [Review] SE-0159: Fix Private Access Levels
Kevin Lundberg
kevin at klundberg.com
Mon Mar 20 19:20:35 CDT 2017
+1 for me too. The distinction always felt too nitpicky to me. File level access as the most limited form of access for the private keyword seems to me to be the simplest and easiest concept to understand.
The example provided of code that would break after this change feels like an anti pattern to me as well. Defining the same method twice in the same type opens the door to a lot of confusion for beginners that may have to read code written this way. The benefits provided don't outweigh the drawbacks in my opinion. Even though it's a breaking change, preventing that pattern could be seen as an additional benefit to this proposal.
--
Kevin Lundberg
> On Mar 20, 2017, at 8:03 PM, Riley Testut via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>> What is your evaluation of the proposal?
> A huge +1. I separate the implementation of all my types into extensions, and this practice resulted in me almost always having to use the fileprivate keyword. Personally, I also have never needed any further access controls than those available in Swift 2, even after writing Swift 3 code since its release.
>
> Additionally, it’s a weird inconsistency that top-level “private” declarations are treated like fileprivate, so happy that this will fix that as well.
>
>> Is the problem being addressed significant enough to warrant a change to Swift?
> 100%.
>
>> Does this proposal fit well with the feel and direction of Swift?
> Yes. Simplifies the access control model by removing a fringe feature (in my opinion).
>
>> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
> Private still doesn’t match the definition of other languages after this change, but I don’t think that’s a bad thing.
>
>> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
> Followed the discussion, and read through the final proposal.
>
>> On Mar 20, 2017, at 4:54 PM, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>>
>> Hello Swift community,
>>
>> The review of SE-0159 "Fix Private Access Levels" begins now and runs through March 27, 2017. The proposal is available here:
>>
>> https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md
>> Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at
>>
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>> or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the top of the message:
>>
>> Proposal link:
>>
>> https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md
>> Reply text
>> Other replies
>> What goes into a review?
>>
>> The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:
>>
>> What is your evaluation of the proposal?
>> Is the problem being addressed significant enough to warrant a change to Swift?
>> Does this proposal fit well with the feel and direction of Swift?
>> If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?
>> How much effort did you put into your review? A glance, a quick reading, or an in-depth study?
>> 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
>
> _______________________________________________
> 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/20170320/7fce1b82/attachment.html>
More information about the swift-evolution
mailing list