The question is not whether it&#39;s in the same file but whether it should have access to internal state (and potentially mutate it). If it shouldn&#39;t, the compiler should enforce it no matter which file you are in. This is not possible right now. A similar argument could be made about var and let. If you are careful, then you can just have var (and put a comment that the value is not supposed to change). Everybody likes let because it&#39;s enforced by the compiler. The same applies to scoped. If you don&#39;t have any implementation details that you want to hide, you will not benefit from scoped. But if you do, the compiler will enforce it much better than any convention or comments.<br><div class="gmail_quote"><div dir="ltr">On Fri, Feb 26, 2016 at 8:53 PM Joseph Lord &lt;<a href="mailto:joseph@human-friendly.com">joseph@human-friendly.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>The key differences are:</div><div><br></div><div>1) You are already the file implementing on that area of code if you are in the same file. </div><div>2) The file shouldn&#39;t be that big whereas the module is likely to have hundreds of files and several people on it.</div><div>3) There are performance benefits to be had with private (at least when Whole Module Optimisation is off).</div><div><br></div><div>I&#39;m not too worried if it does get included it just seems the gains will be quite small. Can you point me to some code that would really benefit or where the lack of it has caused mistakes or problems in the past?</div></div><div dir="auto"><div><br></div><div>Joseph</div></div><div dir="auto"><div><br>On Feb 27, 2016, at 1:24 AM, Ilya Belenkiy &lt;<a href="mailto:ilya.belenkiy@gmail.com" target="_blank">ilya.belenkiy@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div>By the same logic, the comment alone is enough,  the private keyword isn&#39;t necessary. The benefit of scoped is that the intent would be enforceable by the compiler.  <br><div class="gmail_quote"><div dir="ltr">On Fri, Feb 26, 2016 at 6:48 PM Joseph Lord via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div></div><div>On Feb 26, 2016, at 7:05 PM, Douglas Gregor via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><div><br></div><blockquote type="cite"><p style="margin-top:0px;margin-bottom:16px;color:rgb(51,51,51);font-family:&#39;Helvetica Neue&#39;,Helvetica,&#39;Segoe UI&#39;,Arial,freesans,sans-serif,&#39;Apple Color Emoji&#39;,&#39;Segoe UI Emoji&#39;,&#39;Segoe UI Symbol&#39;;font-size:16px;background-color:rgb(255,255,255)">The review of SE-0025 “Scoped Access Level&quot; begins now and runs through March 3, 2016. The proposal is available here:</p><blockquote style="margin:0px 0px 16px;padding:0px 15px;border-left-width:4px;border-left-style:solid;border-left-color:rgb(221,221,221);background-color:rgb(255,255,255)"><div style="margin-top:0px;margin-bottom:0px"><font color="#777777" face="Helvetica Neue, Helvetica, Segoe UI, Arial, freesans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol" size="3"><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0025-scoped-access-level.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0025-scoped-access-level.md</a></font></div></blockquote></blockquote><div><br></div></div><div dir="auto">-0.1<br><div>There is nothing wrong with this proposal but I just don&#39;t see the value over private (plus a little doc comment if absolutely necessary).</div><div><br></div><div>Downside is more language to learn / encounter and complexity to maintain. </div><div><br></div><div>I&#39;ve read the proposal but not the preceding discussion.</div></div><div dir="auto"><div><br></div><div>Joseph</div></div>_______________________________________________<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" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>
</div></blockquote></div></blockquote></div>