<div dir="ltr">On Tue, Mar 21, 2017 at 9:31 PM, Drew Crawford <span dir="ltr">&lt;<a href="mailto:drew@sealedabstract.com" target="_blank">drew@sealedabstract.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div id="m_2483062421166103881bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto"><br><br></div> <br><p class="m_2483062421166103881airmail_on">On March 21, 2017 at 9:18:00 PM, Xiaodi Wu (<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>) wrote:</p> <div><blockquote type="cite" class="m_2483062421166103881clean_bq" style="font-family:Helvetica,Arial;font-size:13px;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"><span><div><span style="color:rgb(0,0,0);font-family:&#39;helvetica Neue&#39;,helvetica;font-size:14px;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;background-color:rgb(255,255,255);float:none;display:inline!important">You&#39;re not hearing the argument. No one &quot;accidentally&quot; included this design as part of SE-0025; it&#39;s sentence number one.<span class="m_2483062421166103881Apple-converted-space"> </span></span></div></span></blockquote></div></span><p>To quote this in context:</p><blockquote type="cite" style="border-top-width:1px;border-right-width:1px;border-bottom-width:1px;padding-left:5px;border-left-width:1px!important;border-left-color:rgb(0,64,128)!important"><p>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.</p></blockquote><div><p>I can see how an adversarial reading of the first sentence would argue that implementation details are not actually hidden by your example (which is, for the record, technically correct, the best kind of correct :-).  However, the second sentence clarifies which kind of implementation details we mean to hide – the accidental use of members outside the scope.</p></div></div></blockquote><div>These are inseparable parts of the whole. It would be absurd if I could not have a private member in a subclass that happens to be identical to a private member in a superclass. I can declare an internal member in an extension to a public type that, in a different module, has an internal member identically declared. Not being able to do so would be intolerably broken. This goes to how essential is the encapsulation provided by subtyping relationships, and how essential is the divide between public and non-public members.</div><div><br></div><div>And this goes to my point: new `private` is enormously complicated, and now you are trying to convince me that a certain shade of &quot;hidden&quot; is sufficiently hidden. Proponents arguing for the usefulness of new `private` show this or that use case that&#39;s enabled, but then disown the issues that arise when the only logical interpretation of the rules leads to scenarios that are difficult to reason about, use correctly, and (though this not something that users would be bothered by) even support in the compiler.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><p>Your example does not involve hiding in that sense, so while it is interesting, and a bug, and should be fixed, etc., it does not thwart the practicable goal of the proposal.</p></div><div><span class=""><div><blockquote type="cite" class="m_2483062421166103881clean_bq" style="font-family:Helvetica,Arial;font-size:13px;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"><span><div><span style="color:rgb(0,0,0);font-family:&#39;helvetica Neue&#39;,helvetica;font-size:14px;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;background-color:rgb(255,255,255);display:inline!important">And no one just &quot;forgot&quot; to make the code above work; it simply can&#39;t be accommodated by the current mangling scheme.<span class="m_2483062421166103881Apple-converted-space"> </span></span></div></span></blockquote></div></span><p>The Swift mangling scheme changes with some frequency, I know of around 3 revs offhand and I do not work in that area often.  So holding this up as an immovable object is odd.</p><p>Things would be different if we declared a stable ABI, but we did not, etc.</p></div></div></blockquote><div>So that would be at least three revs that can&#39;t accommodate this feature. A stable ABI may not be 4.0, but it isn&#39;t terribly far off. The window is closing to fix the implementation, and it&#39;s not obvious that there is a good solution.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><span class=""><div><blockquote type="cite" class="m_2483062421166103881clean_bq" style="font-family:Helvetica,Arial;font-size:13px;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"><span><div><span style="color:rgb(0,0,0);font-family:&#39;helvetica Neue&#39;,helvetica;font-size:14px;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;background-color:rgb(255,255,255);display:inline!important">And--what&#39;s more--_no one seems to be bothered by it_.</span></div></span></blockquote></div></span><p>I volunteer to be bothered by it.  Where’s my cookie?</p></div></div></div></blockquote><div>🍪 . More if you volunteer to be sufficiently bothered to fix it.</div></div><br></div></div>