<div dir="ltr">I have many situations where related, and usually, nested types should have access to implementation details of each other but I want to avoid any other types having access to these details. The simplest example that I have are value types that wrap one or two values. 'Unrelated' types shouldn't have access to these `rawValue`s at all.<div>TJ<br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 12:11 PM, Erica Sadun 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"><span class=""><br>
> On Mar 25, 2016, at 10:57 AM, Tino Heth via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br>
><br>
><br>
>> These are special cases — both file-private and module-private is something that is fairly unusual<br>
><br>
> afaics this is the third time someone mentions that "file-private" is uncommon — so I think it's time someone dissents:<br>
> That statement is at least subjective… right now, "file-private" is one of three access levels, and I wouldn't dare to say either is more or less important than the others.<br>
><br>
> I never encountered situations with the current model where I missed a new "private"-level, and maybe "private" will become fairly unusual for the code I'll be writing.<br>
><br>
> In my existing code, the new meaning of private wouldn't break much, but the current meaning doesn't hurt me, and there are cases where "file-private" is needed.<br>
><br>
> None the less, I don't care much about the "ugliness" of "fileprivate" — but not because I perceive it as unusual:<br>
> I just expect that code completion will do the typing for me, so maybe "f" will be all I have to write (half the characters of "pr" ;-)<br>
<br>
</span>I cannot come up with a single use-case in my code for fileprivate and would love<br>
some real world examples where you'd want visibility in a single file but not across<br>
an entire module.<br>
<br>
The fileprivate behavior has been a bugaboo of mine for some time, particularly in<br>
playground use.<br>
<br>
As far as I'm concerned, the control I really want is public, intra-modular, private, and<br>
private-even-to-extensions-and-subclasses. I assume the latter is a no-go.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- E<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<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>
</div></div></blockquote></div><br></div>