<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><ul class=""><li class=""><span style="color: rgb(36, 41, 46); background-color: rgb(255, 255, 255);" class="">What is your evaluation of the proposal?</span></li></ul><div class=""><font color="#24292e" class="">I agree with the proposal. While I acknowledge that a lexically-scoped access modifier can be useful, giving it the name&nbsp;“private” in Swift is unfortunate. Much of the existing Swift training material suggests a common pattern of adding protocol conformances via extensions. For example, this kind of code is very common:</font></div><div class=""><br class=""></div><div class=""><font color="#24292e" face="Courier" class="">class ToyViewController: UIViewController {</font></div><div class=""><font color="#24292e" face="Courier" class="">&nbsp; private var toysToDisplay: [Toy]</font></div><div class=""><font color="#24292e" face="Courier" class="">}</font></div><div class=""><font color="#24292e" face="Courier" class=""><br class=""></font></div><div class=""><font color="#24292e" face="Courier" class="">extension ToyViewController: UICollectionViewDataSource {</font></div><div class=""><font color="#24292e" face="Courier" class="">&nbsp; // Implement the data source protocol here</font></div><div class=""><font color="#24292e" face="Courier" class="">}</font></div><div class=""><font color="#24292e" class=""><br class=""></font></div><div class=""><font color="#24292e" class="">However, this pattern is broken;&nbsp;<font face="Courier" class="">toysToDisplay</font>&nbsp;cannot be labeled <font face="Courier" class="">private</font> because then it cannot be accessed within the extension. It needs to be <font face="Courier" class="">fileprivate</font> instead. But this adds a barrier to learning; while&nbsp;<font face="Courier" class="">private</font>&nbsp;is a common programming term,&nbsp;<font face="Courier" class="">fileprivate</font>&nbsp;is not. Most users will try&nbsp;<font face="Courier" class="">private</font>&nbsp;first. I believe Swift should intentionally be biased toward ease of use, and the use of&nbsp;<font face="Courier" class="">private</font>&nbsp;to signify scope-level access goes against that principle.</font></div><div class=""><font color="#24292e" class=""><br class=""></font></div><div class=""><span style="color: rgb(36, 41, 46);" class="">There was an argument earlier in the thread that extensions are intended for augmenting a type from the outside. In my experience, it is equally common to have a type and extensions on that type in the same file. This has been demonstrated in WWDC sessions, in training documents, and is common practice among many of the Swift&nbsp;developers I have worked with.</span></div><div class=""><font color="#24292e" class=""><br class=""></font></div><div class=""><font color="#24292e" class="">In Swift 3, there is tension between adding protocol conformances in extensions and having <font face="Courier" class="">private</font>&nbsp;as the soft default for limiting access. I agree that a lexically-scoped access modifier can be useful, but I think it should be spelled&nbsp;<font face="Courier" class="">scoped</font>.&nbsp;“<font face="Courier" class="">private</font>” should revert to its Swift 2 meaning, which is more compatible with the extension- and protocol-oriented nature of Swift. It would be nice if we could make both changes at once, but if that is not possible, it would be better to make the potentially source-breaking change in the Swift 4 timeline, as the bar for source-breaking changes will only increase with each release. "Scoped" access can be added back after Swift 4, if it cannot be part of this&nbsp;release.</font></div><div class=""><font color="#24292e" class=""><br class=""></font></div><div class=""><br class=""></div><ul class=""><li class=""><span style="color: rgb(36, 41, 46); background-color: rgb(255, 255, 255);" class="">Is the problem being addressed significant enough to warrant a change to Swift?</span></li></ul><div class=""><font color="#24292e" class="">Yes. The requirement to use&nbsp;<font face="Courier" class="">fileprivate</font> when adding extensions within the same file makes Swift more difficult to learn.</font></div><ul class=""><li class=""><span style="color: rgb(36, 41, 46); background-color: rgb(255, 255, 255);" class="">Does this proposal fit well with the feel and direction of Swift?</span></li></ul><div class=""><font color="#24292e" class="">Yes. Swift is intended to be a language that is both easy to learn&nbsp;and easy to use. The common use of <font face="Courier" class="">private</font>&nbsp;makes the language more difficult to learn.&nbsp;“<font face="Courier" class="">scoped</font>” access should be a more advanced feature.</font></div><ul class=""><li class=""><span style="color: rgb(36, 41, 46); background-color: rgb(255, 255, 255);" class="">If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</span></li></ul><div class=""><font color="#24292e" class="">Swift is intentionally different here, and I think it’s correct for Swift to be different.</font></div><ul class=""><li class=""><span style="color: rgb(36, 41, 46); background-color: rgb(255, 255, 255);" class="">How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</span></li></ul><div class="">I followed the SE-0025 conversation, this conversation, and have used both Swift 2 and Swift 3 extensively. Even though I know that I’m usually going to need <font face="Courier" class="">fileprivate</font>, it’s such an awkward term that I usually end up writing <font face="Courier" class="">private</font> anyway, and then regretting it. Ideally, we would continue supporting both scoped and file-level access control, by renaming both of them. But because of the increasing bar for source compatibility, I think it’s better to make this change now, and reintroduce scoped access as soon as possible.</div></div><div class=""><br class=""></div><div class="">-BJ</div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 20, 2017, at 5:54 PM, Douglas Gregor via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Hello Swift community,</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">The review of SE-0159 "Fix Private Access Levels" begins now and runs through March 27, 2017. The proposal is available here:</p><blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); background-color: rgb(255, 255, 255);" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><font color="#6a737d" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md</a></font></div></blockquote><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at</p><blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="box-sizing: border-box; background-color: transparent; -webkit-text-decoration-skip: objects; color: rgb(3, 102, 214); text-decoration: none;" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">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:</p><blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); background-color: rgb(255, 255, 255);" class=""><p style="color: rgb(106, 115, 125); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; box-sizing: border-box; margin-top: 0px; margin-bottom: 16px;" class="">Proposal link:</p><blockquote style="box-sizing: border-box; margin: 0px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229);" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><font color="#6a737d" face="-apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3" class=""><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0159-fix-private-access-levels.md</a></font></div></blockquote></blockquote><blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">Reply text</div></blockquote><blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""><blockquote style="box-sizing: border-box; margin: 0px; padding: 0px 1em; border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229);" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class="">Other replies</div></blockquote></blockquote><h5 style="box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 0.875em; line-height: 1.25; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; background-color: rgb(255, 255, 255);" class=""><a id="user-content-what-goes-into-a-review-1" class="anchor" href="https://github.com/apple/swift-evolution/blob/master/process.md#what-goes-into-a-review-1" aria-hidden="true" style="box-sizing: border-box; background-color: transparent; -webkit-text-decoration-skip: objects; color: rgb(3, 102, 214); text-decoration: none; float: left; padding-right: 4px; margin-left: -20px; line-height: 1;"><svg aria-hidden="true" class="octicon octicon-link" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>What goes into a review?</h5><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">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:</p><ul style="box-sizing: border-box; padding-left: 2em; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""><li style="box-sizing: border-box;" class="">What is your evaluation of the proposal?</li><li style="box-sizing: border-box; margin-top: 0.25em;" class="">Is the problem being addressed significant enough to warrant a change to Swift?</li><li style="box-sizing: border-box; margin-top: 0.25em;" class="">Does this proposal fit well with the feel and direction of Swift?</li><li style="box-sizing: border-box; margin-top: 0.25em;" class="">If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?</li><li style="box-sizing: border-box; margin-top: 0.25em;" class="">How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</li></ul><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">More information about the Swift evolution process is available at</p><blockquote style="box-sizing: border-box; margin: 0px 0px 16px; padding: 0px 1em; color: rgb(106, 115, 125); border-left-width: 0.25em; border-left-style: solid; border-left-color: rgb(223, 226, 229); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class=""><div style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0px;" class=""><a href="https://github.com/apple/swift-evolution/blob/master/process.md" style="box-sizing: border-box; background-color: transparent; -webkit-text-decoration-skip: objects; color: rgb(3, 102, 214); text-decoration: none;" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a></div></blockquote><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Thank you,</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">-Doug</p><p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(36, 41, 46); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 16px; background-color: rgb(255, 255, 255);" class="">Review Manager</p></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>