I see. I read those emails, and I think I replied as well. My take on it is that it is no more confusing than using private to not mean the access level that we are discussing right now. If private is already taken and we cannot rename things, I&#39;d say that local is my next choice. I also like scoped.<br><br>--<br>Ilya Belenkiy<br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 14, 2015 at 12:53 PM Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com">matthew@anandabits.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 style="word-wrap:break-word"><div>It was an exchange John McCall and I had on the 9th.</div><div><br></div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001296.html" target="_blank">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001296.html</a></div><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001300.html" target="_blank">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001300.html</a></div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001304.html" target="_blank">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001304.html</a><div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001305.html" target="_blank">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001305.html</a></div></div><div style="word-wrap:break-word"><div><br><div><br></div><div>Matthew</div></div></div><div style="word-wrap:break-word"><div><div><br><div><blockquote type="cite"><div>On Dec 14, 2015, at 11:49 AM, Ilya Belenkiy &lt;<a href="mailto:ilya.belenkiy@gmail.com" target="_blank">ilya.belenkiy@gmail.com</a>&gt; wrote:</div><br><div><div style="white-space:pre-wrap">I missed it. I am not attached to it, but I wish I could see where it happened. Can you point me to the emails?<br><br>--<br>Ilya Belenkiy</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 14, 2015 at 12:25 PM Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.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>The idea of calling this &#39;local&#39; was abandoned a long time ago.  Any proposal around this will be using &#39;scope&#39; or &#39;scoped&#39;.<br><br>Sent from my iPad</div></div><div dir="auto"><div><br>On Dec 14, 2015, at 11:22 AM, Marc Knaup &lt;<a href="mailto:marc@knaup.koeln" target="_blank">marc@knaup.koeln</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">What about &quot;more private&quot; or &quot;really private&quot;? :)<div>j/k</div><div><br></div><div>I also thought about &quot;local&quot; but it&#39;s also not obvious what exactly that means.</div><div>Maybe &quot;my&quot;?  <font face="monospace, monospace">my var xyz = …</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 14, 2015 at 6:17 PM, David Owens II 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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span><br><div><blockquote type="cite"><div>On Dec 14, 2015, at 8:58 AM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.com</a>&gt; wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant: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">I agree that you can concoct arbitrarily complex scenarios and a line must be drawn somewhere.  IMO the best place to draw the line is when you start considering something that is not super straightforward to explain and is not a natural extension of the obviously necessary access modifiers.  </span><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">IMO ‘scope’ passes this test and all of the complex counter-examples do not.  It is the logical conclusion of a simple narrowing of visibility from “everyone” to “module” to “file” to “scope”.  It is simple to explain and understand.  Those who don’t like it don’t need to use it.  Anything more complex is unlikely to pass such a test.</div></div></blockquote></div><br></span><div>I think the simplest counter-example is your own example for extensions. Each extensions will need access to different internals of the the type it’s applied to. So when it comes time to add that extension, you’ll be forced to promote the access control from “local” to “private”.</div><div><br></div><div>Another straight-forward one is a subclass. Since “local” would be “scope” based, a subclass would also knot have access to those members defined as local in the super class, so they’d have to be promoted to private and thus available to all code within the file.</div><div><br></div><div>I think “local” fits this definition:</div><span><div><br></div><div><blockquote type="cite"><span style="display:inline!important">IMO the best place to draw the line is when you start considering something that is not super straightforward to explain and is not a natural extension of the obviously necessary access modifiers.  </span></blockquote><br></div></span><div>It’s not an obviously necessary modifier as it’s usage is extremely limited and requires to be bounced up a level is a lot of design considerations, such as extensions and subclasses. There are certainly times where “local” could be used, but my opinion is that it’s not worth complexity for the limited value that it actually brings to the table.</div><div><br></div><div>-David</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=6ZGE61OxINd5lLe2xYh9Ku-2BXbixWNr2nvfzp2IB1sZht4pc1At4u3IHQXoccEVF7-2FzfUcQ0sW0kGSErzhXCA-2F1QKa-2BZU02osL9VABaKIde9el6VqI2GyJ0pz3t-2BNvEiXuzq6bwS3sBEZrSUG80qyj-2F59-2FBrJOJ3-2F55-2BCQE38pI4UhH-2FfBL4Gkb-2BUkS1Y7iLz9WVHD1OkGZ54ih-2Btu0CxbkgmXhCdr5uO-2F4BvhRTgbQQ-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
</div>
<br>_______________________________________________<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>
<br></blockquote></div><br></div>
</div></blockquote></div></blockquote></div>
</div></blockquote></div><br></div></div></div></blockquote></div>