<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 3, 2017 at 8:34 PM, Douglas Gregor via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>The design, specifically, is that a “private” member declared within a type “X” or an extension thereof would be accessible from:<br></div><div><div><br></div><div><span class="gmail-m_7112255624493902076Apple-tab-span" style="white-space:pre-wrap">        </span>* An extension of “X” in the same file</div><div><span class="gmail-m_7112255624493902076Apple-tab-span" style="white-space:pre-wrap">        </span>* The definition of “X”, if it occurs in the same file</div><div><span class="gmail-m_7112255624493902076Apple-tab-span" style="white-space:pre-wrap">        </span>* A nested type (or extension thereof) of one of the above that occurs in the same file</div></div></div></blockquote></div><div class="gmail_extra"><br></div>Strongly +1, and I fully agree with David Hart draft.</div><div class="gmail_extra"><br></div><div class="gmail_extra">As an app developer that works with Swift everyday, this will fix most of my pain-points with scoped access. It will not only ease a very popular use of extensions, but when asking a new developer this is the default that makes more sense.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Being selfish, with this proposal, you could even delete fileprivate, I would never use it or recommend it. If you want a type private to a file, enclose it under other type.</div><div class="gmail_extra"><div><br></div>-- <div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><div style="font-size:12.8px">Víctor Pimentel</div></div></div></div></div></div></div></div></div></div>
</div></div>