<div dir="ltr">These are very nice refinements if we set a goal to make those scenarios work. I think that they they would just need to be refactored though. If the access level is so convoluted, there is something wrong with the API.<div><br></div><div>--</div><div>Ilya Belenkiy</div><div><br><div class="gmail_quote"><div dir="ltr">On Sun, Dec 13, 2015 at 6:53 PM Matthew Johnson via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> 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><br></div><blockquote type="cite"><div><div><blockquote type="cite"><div><span style="font-family:HelveticaNeue;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 don’t think these are troll proposals. They *are* a little more limited, a little more esoteric, but you could say the same thing about `local` vs. `private`. And in some cases you can emulate some of these with the four access modifiers you want, but again, you could say the same thing about `local` vs. `private`.</span><br style="font-family:HelveticaNeue;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"></div></blockquote></div><br><div>You're right. Your examples have convinced me of this point. There exist non-troll proposals for further access modifiers.</div></div></blockquote><br></div><div dir="auto"><div>There are definitely further refinements to access control that could be desired. I have given them some thought as this thread has proceeded. There would be ways to accommodate them through refinement of the 'scope' access level. </div><div><br></div><div>For example, we could allow a syntactic 'scope {}' block which would be transparent for all purposes except introducing a scope for access control. We could also allow labeled scopes and allow the 'scope' access control level to specify a label, for example to allow an inner type to expose scoped members to the outer type but not other code in the same file.</div><div><br></div><div>While this potential exists I think it introduces complexity that is probably not worth it. I am only mentioning these ideas to demonstrate that a 'scope' access modifier is something that can be refined to provide more control if enough compelling use cases were identified. We wouldn't need to add entirely new access modifiers to address such use cases.</div><div><br></div><div>Matthew</div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=JoVvr1nwtkf-2FcycRIsh0Ekp6hrdbCH7iUjVG-2FENQSucNUPDQXHTqDhKqcqAzvtnskZ88RKHYJKC5DKgTPhE5OO3lu-2BQLH5Q6k4hV-2FVb7kmZGhM51jKmQrPBL6eglYuXQlM2bPl59b7rAMLkDJhA3BpZF2gmMjpRB56u8XyMVXe1Zdv0BgoWwihsi0kYCYcTAJ6uQvzRHd8j9WWPVFvIm7ptS-2FoCYNrI9ppmjrMu0T78-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>
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></div>