<div dir="ltr">Yes, #module would be a nice addition and I like the #file and #modules scope names since they can't clash with user defined names.</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"> -- Howard.<br></div></div>
<br><div class="gmail_quote">On 30 March 2016 at 11:47, Brent Royal-Gordon <span dir="ltr"><<a href="mailto:brent@architechies.com" target="_blank">brent@architechies.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> If Scala style access modifiers were adopted for Swift then a private(file) modifier would also be necessary to give the current private functionality.<br>
<br>
I could imagine having these options:<br>
<br>
public // visible to all everyone<br>
private(scope-name, scope-name, …) // visible to specified scopes (plus current scope)<br>
private // visible only to current scope<br>
<br>
scope-name could perhaps be:<br>
<br>
* A type name (or Self, which would mimic C++-style private, or perhaps even C++-style protected depending on how we treat inheritance)<br>
* A module name (or #module for the current module)<br>
* A file name string (or #file for the current file)<br>
<br>
And then the default would simply be `private(#module)`.<br>
<br>
Alternatively, the parameterized level could be given a different name, like `internal` or `shared`. If that were the case, then `#module` might simply be the default.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Brent Royal-Gordon<br>
Architechies<br>
<br>
</font></span></blockquote></div><br></div>