<div dir="ltr">i am missing some protection level, which can be called &quot;classprivate&quot; or &quot;structprivate&quot; / &quot;enumprivate&quot; (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 &#39;private&#39;</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 &#39;private&#39;</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&#39;t use either private or fileprivate due to compilation errors</div><div><br></div><div>3) i do not want to have neither &quot;foo&quot; nor &quot;bar&quot; public</div><div><br></div><div>4) &quot;internal&quot; doesn&#39;t help as &quot;foo&quot; and &quot;bar&quot; will be available to my app (which is unwanted).</div><div><br></div><div>is there some &quot;classprivate&quot; to help here? if not so far, shall there be one? opinions?</div><div><br></div><div>Mike</div><div><br></div></div>