<div dir="ltr">+1 What is &quot;current private&quot; can be replicated with the new behavior, use of files, and use of modules.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 22, 2017 at 8:59 PM, Jordan Rose 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Mar 21, 2017, at 15:26, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_7310485484387075998Apple-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">The kicker is, _it also doesn&#39;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="m_7310485484387075998Apple-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="m_7310485484387075998Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">private</span><span style="font-variant-ligatures:no-common-ligatures"><span class="m_7310485484387075998Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">var</span><span style="font-variant-ligatures:no-common-ligatures"><span class="m_7310485484387075998Apple-converted-space"> </span>bar:<span class="m_7310485484387075998Apple-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="m_7310485484387075998Apple-converted-space"> </span>{<span class="m_7310485484387075998Apple-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="m_7310485484387075998Apple-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="m_7310485484387075998Apple-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="m_7310485484387075998Apple-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="m_7310485484387075998Apple-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="m_7310485484387075998Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">private</span><span style="font-variant-ligatures:no-common-ligatures"><span class="m_7310485484387075998Apple-converted-space"> </span></span><span style="font-variant-ligatures:no-common-ligatures">var</span><span style="font-variant-ligatures:no-common-ligatures"><span class="m_7310485484387075998Apple-converted-space"> </span>bar:<span class="m_7310485484387075998Apple-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="m_7310485484387075998Apple-converted-space"> </span>{<span class="m_7310485484387075998Apple-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="m_7310485484387075998Apple-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="m_7310485484387075998Apple-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&#39;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></div><div>Without commenting on anything else, it is considered a bug that this does not work under SE-0025, and it <i>has</i> been <a href="https://bugs.swift.org/browse/SR-2634" target="_blank">complained about</a> (though not vigorously, since the workaround is trivial), and fixing it would not be an ABI-breaking change (because private functions are not part of a module&#39;s ABI).</div><div><br></div><div>Jordan</div></div></div><br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div>