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

Robert Hedin robert.hedin at weather.com
Wed Mar 22 10:33:04 CDT 2017


   - What is your evaluation of the proposal?

+1

I'm generally a proponent of scoped access control and have been torn over
this proposal. What finally pushed me over the edge has been the time I've
taken to review others code. I've got a team of about 32 iOS developers and
their code shows a heavy lean toward using 'fileprivate' over 'private'.
When  I dig into it to determine why, the most common response has been
something along the lines of "I'm not sure what the difference is". In at
least one case, the developer said "well, I usually try 'private' until it
won't compile, then I just change things to 'fileprivate'". Granted this is
an education and training issue, but with other languages the primary
access modifiers are pretty easy to understand. Intermixing scoped access
vs file based protections seems to cause unneeded confusion that I suspect
was increased  after running the migrator.

I like elegance and I like the compiler catching things for me, but at the
end of the day I'd rather see things simple and easy to understand and
explain. To that end, I'd prefer to revert to the previous behavior while
we decide on a comprehensive solution based on the learnings from this
effort.



   - Is the problem being addressed significant enough to warrant a change
   to Swift?

Yes.


   - Does this proposal fit well with the feel and direction of Swift?

Yes. Increased simplicity reduces overall cognitive load on the developer.


   - If you have used other languages or libraries with a similar feature,
   how do you feel that this proposal compares to those?

The access control modifiers in Swift are somewhat different than most
other languages I've used, so a comparison between C# or Java seems forced.


   - How much effort did you put into your review? A glance, a quick
   reading, or an in-depth study?

Several hours, both reviewing internal affected code, the proposal, and
these discussions.

rob.


On Mon, Mar 20, 2017 at 7:54 PM, Douglas Gregor <dgregor at apple.com> 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
>
>
> <https://github.com/apple/swift-evolution/blob/master/process.md#what-goes-into-a-review-1>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-announce mailing list
> swift-evolution-announce at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution-announce
>
>


-- 
*Robert **Hedin  *|Dir Software Engineering
*w:* 770-226-2650      *e:* robert.hedin at weather.com
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps> <http://weather.com/apps>
<http://weather.com/apps>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170322/96568a4c/attachment.html>


More information about the swift-evolution mailing list