<div dir="ltr">i am missing some protection level, which can be called "classprivate" or "structprivate" / "enumprivate" (names could be better). here is an example:<div><br></div><div>--- file Some.swift ---</div><div><p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica;min-height:14px"><br></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="color:rgb(4,51,255)">class</span> Some {</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(4,51,255)"><span style="color:rgb(0,0,0)"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span></span>private<span style="color:rgb(0,0,0)"> </span>func<span style="color:rgb(0,0,0)"> foo() {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,143,0)"><span style="color:rgb(0,0,0)"><span class="gmail-Apple-tab-span" style="white-space:pre">                </span></span><span style="text-decoration:underline;color:rgb(0,0,0)">b</span><span style="color:rgb(0,0,0)">ar() </span>// error: inaccessible due to 'private'</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>}</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">}</p></div><div><br></div><div><div>--- file Some+Bar.swift ---</div></div><div><br></div><div><p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(4,51,255)">extension<span style="color:rgb(0,0,0)"> </span><span style="color:rgb(52,149,175)">Some</span><span style="color:rgb(0,0,0)"> {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(4,51,255)"><span style="color:rgb(0,0,0)"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span></span>private<span style="color:rgb(0,0,0)"> </span>func<span style="color:rgb(0,0,0)"> bar() {</span></p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,143,0)"><span style="color:rgb(0,0,0)"><span class="gmail-Apple-tab-span" style="white-space:pre">                </span></span><span style="text-decoration:underline;color:rgb(0,0,0)">f</span><span style="color:rgb(0,0,0)">oo() </span>// error: inaccessible due to 'private'</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span class="gmail-Apple-tab-span" style="white-space:pre">        </span>}</p>
<p style="margin:0px;font-stretch:normal;font-size:11px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)">}</p></div><div><br></div><div>1) i want to have this extension in a different file (to keep file sizes manageable).</div><div><br></div><div>2) i can't use either private or fileprivate due to compilation errors</div><div><br></div><div>3) i do not want to have neither "foo" nor "bar" public</div><div><br></div><div>4) "internal" doesn't help as "foo" and "bar" will be available to my app (which is unwanted).</div><div><br></div><div>is there some "classprivate" to help here? if not so far, shall there be one? opinions?</div><div><br></div><div>Mike</div><div><br></div></div>