<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>While valid, my understanding is that the use of extensions that <i>should </i>have access to private members is more common than the use of extensions to explicitly prevent access.</div><div><br></div><div>More importantly though, using extensions to prevent access to private members can be accomplished by declaring the extensions in another file. The reverse is not true; extensions that <i>should</i> have access to private members is impossible.&nbsp;</div><div><br></div><div>tl;dr; using extensions as a means to disallow access to private members is (from what I understand) far less common, and if someone really wanted to do that, they could instead declare the extensions in another file.</div><div><br>On Apr 6, 2017, at 5:34 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com">xiaodi.wu@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">On Thu, Apr 6, 2017 at 7:28 PM, Riley Testut via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I cannot express how strongly I believe this&nbsp;<i>is&nbsp;</i>the direction Swift should go, so a huge, gigantic,</div><div><br></div><div><span style="font-size:64px">+1</span></div><div>from me.</div><div><br></div><div>After thinking it over, I do not have any qualms with fileprivate itself. I think that the functionality provided by fileprivate is valuable, and I also agree it shouldn’t be the default.</div><div><br></div><div><b>However</b></div><div><b><br></b></div><div>This proposal would solve the problems introduced by Swift 3’s private, which has resulted in me defaulting to fileprivate for almost all “private” variables due to my heavy use of extensions.</div><div><br></div><div>Beyond me, however, I can attest that when teaching others Swift, they initially are confused why private doesn’t work for extensions. To them, it does not feel intuitive, and it certainly doesn’t to me either.</div></div></blockquote><div><br></div><div>`private` works for extensions exactly how the authors of SE-0025 intended it to do. Your comments do not address what would happen for those people who are making use of this functionality currently to isolate methods to the extension only.</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>One argument I saw throughout these discussions was that this encourages people to put all their code in one file. To that I ask, how is this any different than what we have now? Fileprivate doesn’t fix this either.</div><div><br></div><div>Ultimately, this keeps things&nbsp;<i>almost exactly the same</i>&nbsp;as what we have now, but addresses the concerns of many in the Swift community. If you don’t want to use private with extensions, people can simply&nbsp;<i>not use private variables in extensions.</i></div><div><i><br></i></div><div>I genuinely believe this will satisfy the majority who were upset by fileprivate, and I do not think it will affect those who were in favor of fileprivate. So yes, again +10000, and let’s&nbsp;<i>please</i>&nbsp;be done with this fileprivate/private debate after this.</div><div><br></div><div>(Also, I personally don’t view this as a “temporary workaround” like some others. I would be very happy if this was the private/fileprivate solution forever).</div><div><div class="h5"><div><br></div><div><blockquote type="cite"><div>On Apr 6, 2017, at 5:05 PM, Vladimir.S via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_-4395165404693997923Apple-interchange-newline"><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">If you don't want to resolve the mistake of SE-0025 by proposing a really solution but not a workaround, then just leave the things where they are currently. Proposed "improvement" IMO is more confusing than helping.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Sorry, I don't buy &lt;&lt;..most of those proposals are not in scope for discussion in Swift 4 (or any later release), given the significant impact on source compatibility&gt;&gt;, because SE-0169 is also a source breaking change, and the problem of access modifiers is important enough to relax the rule of source compatibility for it, *especially if this is the last chance*.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Also, it seems like core team was ready to accept SE-0159(Fix Private Access Levels) which also has impact on source compatibility(given it suggested to remove scoped-private).</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">IMO SE-0159 + new 'scoped' keyword for scoped-private is the solution we need.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">So, -1 from me.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">On 07.04.2017 2:10, Douglas Gregor via swift-evolution wrote:</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hello Swift community,<br><br>The review of SE-0169 "Improve Interaction Between private Declarations and<br>Extensions" begins now and runs through April 11, 2017. The proposal is<br>available here:<br><br>&nbsp;&nbsp;&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0169-improve-interaction-between-private-declarations-and-extensions.md" target="_blank">https://github.com/apple/<wbr>swift-evolution/blob/master/<wbr>proposals/0169-improve-<wbr>interaction-between-private-<wbr>declarations-and-extensions.md</a><br><br>Reviews are an important part of the Swift evolution process. All reviews<br>should be sent to the swift-evolution mailing list at<br><br>&nbsp;&nbsp;&nbsp;<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br><br>or, if you would like to keep your feedback private, directly to the review<br>manager. When replying, please try to keep the proposal link at the top of<br>the message:<br><br>&nbsp;&nbsp;&nbsp;Proposal link:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0169-improve-interaction-between-private-declarations-and-extensions.md" target="_blank">https://github.com/<wbr>apple/swift-evolution/blob/<wbr>master/proposals/0169-improve-<wbr>interaction-between-private-<wbr>declarations-and-extensions.md</a><br><br>&nbsp;&nbsp;&nbsp;Reply text<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Other replies<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;<a href="https://github.com/apple/swift-evolution/blob/master/process.md#what-goes-into-a-review-1" target="_blank">https://github.com/<wbr>apple/swift-evolution/blob/<wbr>master/process.md#what-goes-<wbr>into-a-review-1</a>&gt;What<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goes into a review?<br><br>The goal of the review process is to improve the proposal under review<br>through constructive criticism and, eventually, determine the direction of<br>Swift. When writing your review, here are some questions you might want to<br>answer in your review:<br><br>&nbsp;* What is your evaluation of the proposal?<br>&nbsp;* Is the problem being addressed significant enough to warrant a change<br>&nbsp;&nbsp;&nbsp;to Swift?<br>&nbsp;* Does this proposal fit well with the feel and direction of Swift?<br>&nbsp;* If you have used other languages or libraries with a similar feature,<br>&nbsp;&nbsp;&nbsp;how do you feel that this proposal compares to those?<br>&nbsp;* How much effort did you put into your review? A glance, a quick<br>&nbsp;&nbsp;&nbsp;reading, or an in-depth study?<br><br>More information about the Swift evolution process is available at<br><br>&nbsp;&nbsp;&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/process.md" target="_blank">https://github.com/apple/<wbr>swift-evolution/blob/master/<wbr>process.md</a><br><br>Thank you,<br><br>-Doug<br><br>Review Manager<br><br><br><br>______________________________<wbr>_________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br><br></blockquote><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">______________________________<wbr>_________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">swift-evolution mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:swift-evolution@swift.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-evolution@swift.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a></div></blockquote></div><br></div></div></div><br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div></div>
</div></blockquote></body></html>