<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Oct 30, 2017, at 5:34 AM, Mike Kluev &lt;<a href="mailto:mike.kluev@gmail.com" class="">mike.kluev@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">On 30 October 2017 at 07:30, Adam Kemp <span dir="ltr" class="">&lt;<a href="mailto:adam.kemp@apple.com" target="_blank" class="">adam.kemp@apple.com</a>&gt;</span> wrote:<div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="auto" class=""><span class="gmail-"><br class=""></span><div class="">No. There are two reasonable options:</div><div class=""><br class=""></div><div class="">1. Make it public. If it’s needed outside the module then this is an accurate description of its access level.&nbsp;</div><div class=""><br class=""></div><div class="">2. Make it internal and accept that any code in the same module can access it. Again, that is effectively what your proposed scope allows anyway so internal is an accurate description of its actual access level. Call it what it is.</div><div class=""><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Adam, i fail to see why you say "No" to "one module per class approach" if the goal is to make the individual multi-file classes as isolated as possible (i.e. not see each other "internal" stuff). which (this goal) is considered the "way to go" approach in other languages and the "default" behaviour.</div></div></div></div></div></blockquote><div><br class=""></div><div>I didn’t mean “no, you can’t do that”. You can if you want to. What I meant was “no, I’m not suggesting that you should do that”. I don’t think it’s necessary.</div><div><br class=""></div><div>Which other language has an access level like the one being proposed?</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">this:</div><div class=""><br class=""></div><div class="">SingleFileClass1.swift // with bunch of "privates" inside</div><div class=""><br class=""></div><div class=""><div class="">SingleFileClass2.swift // with bunch of "privates" inside</div><div class=""><br class=""></div></div><div class=""><div class="">SingleFileClass3.swift // with bunch of "privates" inside</div></div><div class=""><br class=""></div><div class="">is equivalent to this:</div><div class=""><br class=""></div><div class="">Module solely&nbsp;for Class1</div><div class="">&nbsp; &nbsp;Class1.swift // with bunch of "internals inside</div><div class="">&nbsp; &nbsp;Class1+Extension.swift // with bunch of "internals" inside</div><div class="">&nbsp; &nbsp;</div><div class="">Module solely&nbsp;for Class2</div><div class=""><div class="">&nbsp; &nbsp;Class2.swift // with bunch of "internals" inside</div><div class="">&nbsp; &nbsp;Class2+Extension.swift // with bunch of "internals" inside &nbsp;</div></div><div class=""><br class=""></div><div class=""><div class="">Module solely for Class3</div><div class="">&nbsp; &nbsp;Class3.swift &nbsp;// with bunch of "internals" inside</div><div class="">&nbsp; &nbsp;Class3+Extension.swift // with bunch of "internals" inside</div><div class="">&nbsp; &nbsp;</div></div><div class=""><br class=""></div><div class="">still "no" ?</div><div class=""><br class=""></div><div class="">i mean, it's fine (although a bit odd) that a mere change from a single-file to a multi-file class leads to such drastic consequences. different to what i saw before. but I can adapt of course.</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="auto" class=""><div class=""></div><div class="">Either way the answer is basically the same: don’t obfuscate the effective access level and pretend you’re being strict when you’re really not. It’s like putting a lock on the door with the key hanging from the doorknob. You may as well just keep it unlocked.&nbsp;</div><span class="gmail-"><div class=""><br class=""></div></span></div></blockquote><div class=""><br class=""></div><div class="">nice analogy :-)</div><div class=""><br class=""></div><div class="">Mike<br class=""></div><div class=""><br class=""></div></div></div></div>
</div></blockquote></div><br class=""></div></body></html>