<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>The idea of calling this 'local' was abandoned a long time ago. Any proposal around this will be using 'scope' or 'scoped'.<br><br>Sent from my iPad</div><div><br>On Dec 14, 2015, at 11:22 AM, Marc Knaup <<a href="mailto:marc@knaup.koeln">marc@knaup.koeln</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">What about "more private" or "really private"? :)<div>j/k</div><div><br></div><div>I also thought about "local" but it's also not obvious what exactly that means.</div><div>Maybe "my"? <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"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></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 class=""><br><div><blockquote type="cite"><div>On Dec 14, 2015, at 8:58 AM, Matthew Johnson <<a href="mailto:matthew@anandabits.com" target="_blank">matthew@anandabits.com</a>> 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 class=""><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">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></body></html>