<div dir="ltr">On Tue, Mar 21, 2017 at 9:40 PM, Charles Srstka <span dir="ltr"><<a href="mailto:cocoadev@charlessoft.com" target="_blank">cocoadev@charlessoft.com</a>></span> wrote:<br><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 style="word-wrap:break-word"><span class="gmail-"><blockquote type="cite">On Mar 21, 2017, at 9:17 PM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>> wrote:<br></blockquote><div><blockquote type="cite"><br class="gmail-m_1152184534085182521Apple-interchange-newline"><div><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline">On Tue, Mar 21, 2017 at 8:31 PM, Charles Srstka<span class="gmail-m_1152184534085182521Apple-converted-space"> </span></span><span dir="ltr" style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><<a href="mailto:cocoadev@charlessoft.com" target="_blank">cocoadev@charlessoft.<wbr>com</a>></span><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline"><span class="gmail-m_1152184534085182521Apple-converted-space"> </span></span><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline">wrote:</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra" style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On Mar 21, 2017, at 8:15 PM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>> wrote:</div><br class="gmail-m_1152184534085182521m_-8549773196041780473Apple-interchange-newline"><div><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline">On Tue, Mar 21, 2017 at 8:00 PM, Charles Srstka<span class="gmail-m_1152184534085182521m_-8549773196041780473Apple-converted-space"> </span></span><span dir="ltr" style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><<a href="mailto:cocoadev@charlessoft.com" target="_blank">cocoadev@charlessoft.c<wbr>om</a>></span><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline"><span class="gmail-m_1152184534085182521m_-8549773196041780473Apple-converted-space"> </span></span><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline">wrote:</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra" style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><span><blockquote type="cite">On Mar 21, 2017, at 7:49 PM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>> wrote:<br></blockquote></span><div><span><blockquote type="cite"><br class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724Apple-interchange-newline"><div><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline">On Tue, Mar 21, 2017 at 6:46 PM, Charles Srstka<span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724Apple-converted-space"> </span></span><span dir="ltr" style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><<a href="mailto:cocoadev@charlessoft.com" target="_blank">cocoadev@charlessoft.c<wbr>om</a>></span><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724Apple-converted-space"> </span></span><span style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline">wrote:</span><br style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra" style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><span><blockquote type="cite">On Mar 21, 2017, at 5:26 PM, Xiaodi Wu via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:<br></blockquote><div><blockquote type="cite"><br class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-interchange-newline"><div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">So, if four/five access modifiers are too many, which one is carrying the least weight? Which one could be removed to simplify the scheme while maintaining the most expressiveness? Which one doesn't fulfill even its own stated goals? Well, one of the key goals of `private` was to allow members to be encapsulated within an extension, hidden even from the type being extended (and vice versa for members defined in the type). It says so in the first sentence of SE-0025. As seen above in my discussion with Charles Srstka, even supporters of `private` disagree with that motivation to begin with. The kicker is, _it also doesn't work_. Try, for instance:</div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">```</div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">struct</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>Foo {</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)"><span style="font-variant-ligatures:no-common-ligatures"> <span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">private</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">var</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>bar:<span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">Int</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>{<span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">retur<wbr>n</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">42</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>}</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">}</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)"><span style="font-variant-ligatures:no-common-ligatures">extension</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(79,129,135)">Foo</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>{</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(186,45,162)"><span style="font-variant-ligatures:no-common-ligatures"> <span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">private</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">var</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>bar:<span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">Int</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>{<span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">retur<wbr>n</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">43</span><span style="font-variant-ligatures:no-common-ligatures"><span class="gmail-m_1152184534085182521m_-8549773196041780473m_5268141798906625724m_1779768077800158996Apple-converted-space"> </span>}</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">}</span></div></div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">```</div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">The code above should compile and does not. If I understood correctly the explanation from a core team member on this list, it's unclear if it can be made to work without changing how mangling works, which I believe impacts ABI and is not trivial at all. Thus, (a) even proponents of new `private` disagree on one of two key goals stated for new `private`; (b) that goal was never accomplished, and making it work is not trivial; (c) no one even complained about it, suggesting that it was a low-yield goal in the first place.</div></div></blockquote></div><br></span><div>Multiple people have already brought up cases in which they are using ‘private’. The repeated mention of another, unrelated use case that was mentioned in the SE-0025 proposal does not invalidate the real-world use cases which have been presented. In fact, it rather makes it appear as if the motivation to remove ‘private’ is based on a strange invocation of the appeal-to-authority fallacy, rather than an actual improvement to the language.</div></div></blockquote><div><br></div><div>I'm not sure how to respond to this. SE-0025, as designed, is not fully implemented. And as I said above, IIUC, it cannot be fully implemented without ripping out a lot of mangling code that is unlikely to be ripped out before Swift 4. _And there is no evidence that anyone cares about this flaw; in fact, you are saying as much, that you do not care at all!_ If this is not sufficient indication that the design of SE-0025 does not fit with the overall direction of Swift, what would be?</div></div></div></div></blockquote><div><br></div></span><div>Because there are other uses cases for ‘private', *not* involving extensions, which I *do* care about. The fact that part of the proposal was badly written (and really, that’s all this is</div></div></div></blockquote><div><br></div><div>Huh? The code above *should compile*--that is a primary aim for SE-0025. It does not compile and there is not a timeline (afaict) for its compiling. It does not bother you that the 25th proposal considered in the Swift evolution process, already once revised, is not fully implemented and may never be?</div></div></div></div></blockquote><div><br></div></span><div>Someone finding a bug/oversight in the compiler behavior does not compel me to throw out the baby with the bathwater, no.</div></div></div></blockquote><div><br></div><div>You're not hearing the argument. No one "accidentally" included this design as part of SE-0025; it's sentence number one.</div></div></div></div></blockquote></div><br></span><div>Or not. Here’s the actual text of the introductory paragraph:</div><div><br></div><div>"Scoped access level allows hiding implementation details of a class or a class extension at the class/extension level, instead of a file. It is a concise expression of the intent that a particular part of a class or extension definition is there only to implement a public API for other classes or extensions and must not be used directly anywhere outside of the scope of the class or the extension.”</div><div><br></div><div>So here we have “class or extension”, or some variant thereof, five separate times. It honestly reads like it originally just said “class”, and the author systematically went through it and added “or extension” to each of them to make sure his/her bases were covered.</div></div></blockquote><div><br></div><div>The meaning of that sentence is made quite clear by the example in code given in that proposal:</div><div><br></div><div>```</div><div><pre style="box-sizing:border-box;font-family:sfmono-regular,consolas,'liberation mono',menlo,courier,monospace;font-size:13.600000381469727px;margin-top:0px;margin-bottom:0px;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;word-break:normal;color:rgb(36,41,46)"><span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">class</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(121,93,163)">A</span> {
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">private</span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">var</span> counter <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">=</span> <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">0</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> public API that hides the internal state</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">func</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(121,93,163)">incrementCount</span>() { <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">++</span>counter }
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> hidden API, not visible outside of this lexical scope</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">private</span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">func</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(121,93,163)">advanceCount</span>(<span class="gmail-pl-smi" style="box-sizing:border-box;color:rgb(51,51,51)"><span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(121,93,163)">dx</span></span>: <span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">Int</span>) { counter <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">+=</span> dx }
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> incrementTwice() is not visible here</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span>}
<span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">extension</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(121,93,163)">A</span> {
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> counter is not visible here</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span> <span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> advanceCount() is not visible here</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> may be useful only to implement some other methods of the extension</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span> <span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> hidden from anywhere else, so incrementTwice() doesn’t show up in </span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span> <span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"><span class="gmail-pl-c" style="box-sizing:border-box">//</span> code completion outside of this extension</span>
<span class="gmail-pl-c" style="box-sizing:border-box;color:rgb(150,152,150)"></span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">private</span> <span class="gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93)">func</span> <span class="gmail-pl-en" style="box-sizing:border-box;color:rgb(121,93,163)">incrementTwice</span>() {
<span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">incrementCount</span>()
<span class="gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179)">incrementCount</span>()
}
}</pre></div><div>```</div><div><br></div><div>If `counter` is not visible in `extension A { ... }`, then I must be able to define my own `counter` in extension A. That is just how visibility works in Swift; no other understanding of "visibility" can be admitted here. Unless you mean to argue that, in reading this proposal, you honestly think it's correct that `counter` may or may not be declared in `extension A { ... }` depending on where `class A` is declared.</div><div> </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 style="word-wrap:break-word"><div>And didn’t quite succeed; the wording doesn’t account for value types.</div><div><br></div><div>And anyway, I’m not sure how you even get “extensions should be able to shadow private members” as Priority Number One™, based on that sentence. Which part of the sentence does your code example violate? The sentence says that implementation details are hidden, and so they are. The struct can’t access the extension’s private members, or vice versa. The name-mangling issue that causes the compiler to choke is simply a *bug*, an unintended consequence that the author didn’t consider. And as I said before, I’d be perfectly fine with striking all the “or extension”s from that paragraph and having ‘private’ only restrict things inside the types themselves (within a module, of course).</div></div></blockquote><div><br></div><div>Whether you're fine with that is neither here nor there. It was not the proposal reviewed and approved by the community, and it's not the proposal considered here.</div><div> </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 style="word-wrap:break-word"><div>Or, just fixing the mangling so that works. Honestly, I don’t understand what kind of point the above is supposed to make, other than pointing fingers and laughing at somebody for making a mistake.</div></div></blockquote><div><br></div><div>The point I'm making is that `private` is *very* hard to reason about and likely even harder to implement. This is not the mistake of the author or the implementor of the proposal. The entire Swift community reviewed the document not once but twice, and we are still discovering pitfalls. This certainly backs up testimony that it is a difficult feature to learn and teach. Does such a difficult feature hold its own weight? The argument made in this proposal is that it overwhelmingly does not, and therefore the complexity it adds to Swift is harmful.</div><div><br></div></div></div></div>