<div dir="ltr">On Sat, Mar 25, 2017 at 1:11 AM, Carl Brown1 <span dir="ltr"><<a href="mailto:Carl.Brown1@ibm.com" target="_blank">Carl.Brown1@ibm.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><p><font size="2">Yes, it would change my opinion of it. I wouldn't become a strong supporter because I don't see any value in it, but a rigorous proof that this proposal could not possibly introduce regressions to any existing codebases would change my opinion from "strongly against" to "doesn't matter to me, I'll stop arguing against it and go get my real work done".</font></p></div></blockquote><div><br></div><div>Well, that's promising, I guess? I think it's entirely reasonable to want a migration path that can demonstrably preserve the behavior of existing codebases.</div><div><br></div><div>For most use sites, it would be no more than find-and-replace; a more sophisticated process will be required for scenarios where a private declaration uses a name identical to something called elsewhere in the file--in the worst case, a renaming will be required, such as in a case like this:</div><div><br></div><div>```</div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">func</span><span style="font-variant-ligatures:no-common-ligatures"> f() -> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">String</span><span style="font-variant-ligatures:no-common-ligatures"> {</span></p>
<p 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;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures">return</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"A"</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">}</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p 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">struct</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> S {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">static</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">func</span><span style="font-variant-ligatures:no-common-ligatures"> g() -> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">String</span><span style="font-variant-ligatures:no-common-ligatures"> {</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(186,45,162)">return</span><span style="font-variant-ligatures:no-common-ligatures"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(49,89,93)">f</span><span style="font-variant-ligatures:no-common-ligatures">()</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> }</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">}</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p 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;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(79,129,135)">S</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> {</span></p>
<p 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;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures">private</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures">static</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures">func</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> f() -> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(112,61,170)">String</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> {</span></p>
<p 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;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures">return</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"B"</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"> }</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">}</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0);min-height:13px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(79,129,135)">S</span><span style="font-variant-ligatures:no-common-ligatures">.</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(49,89,93)">g</span><span style="font-variant-ligatures:no-common-ligatures">()</span></p></div><div><span style="font-variant-ligatures:no-common-ligatures">```</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">This will require some compiler smarts. And I think a successful proposal would have to provide solid proof that all such scenarios are covered. I'll think about this over the weekend.</span></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><p><br><br><font size="2">-Carl</font><br><br><img width="16" height="16" src="cid:1__=8FBB0A7DDFB206B68f9e8a93df938690918c8FB@" border="0" alt="Inactive hide details for Xiaodi Wu ---03/25/2017 12:33:55 AM---Would it change your opinion on the proposal? On Sat, Mar 25, 2"><font size="2" color="#424282">Xiaodi Wu ---03/25/2017 12:33:55 AM---Would it change your opinion on the proposal? On Sat, Mar 25, 2017 at 12:10 AM, Carl Brown1 <Carl.Br</font><span class="gmail-"><br><br><font size="2" color="#5F5F5F">From: </font><font size="2">Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>></font><br><font size="2" color="#5F5F5F">To: </font><font size="2">Carl Brown1/US/IBM@IBM</font><br><font size="2" color="#5F5F5F">Cc: </font><font size="2">Drew Crawford <<a href="mailto:drew@sealedabstract.com" target="_blank">drew@sealedabstract.com</a>>, Jonathan Hull <<a href="mailto:jhull@gbis.com" target="_blank">jhull@gbis.com</a>>, swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></font><br></span><font size="2" color="#5F5F5F">Date: </font><font size="2">03/25/2017 12:33 AM</font><span class="gmail-"><br><font size="2" color="#5F5F5F">Subject: </font><font size="2">Re: [swift-evolution] [Review] SE-0159: Fix Private Access Levels</font><br></span></p><hr width="100%" size="2" align="left" noshade style="color:rgb(128,145,165)"><br><br><br>Would it change your opinion on the proposal?<br><br><br>On Sat, Mar 25, 2017 at 12:10 AM, Carl Brown1 <<a href="mailto:Carl.Brown1@ibm.com" target="_blank"><u><font color="#0000FF">Carl.Brown1@ibm.com</font></u></a>> wrote:
<ul><font size="2">I would very much like to see your proof that the resultant code is unchanged in an arbitrary codebase. </font><br><font size="2"><br>-Carl</font><br><br><img src="cid:1__=8FBB0A7DDFB206B68f9e8a93df938690918c8FB@" width="16" height="16" alt="Inactive hide details for Xiaodi Wu ---03/25/2017 12:01:26 AM---On Fri, Mar 24, 2017 at 11:55 PM, Carl Brown1 <Carl.Brown1@ibm."><font size="2" color="#424282">Xiaodi Wu ---03/25/2017 12:01:26 AM---On Fri, Mar 24, 2017 at 11:55 PM, Carl Brown1 <</font><a href="mailto:Carl.Brown1@ibm.com" target="_blank"><u><font size="2" color="#0000FF">Carl.Brown1@ibm.com</font></u></a><font size="2" color="#424282">> wrote: > Maybe this is the core</font><br><font size="2" color="#5F5F5F"><br>From: </font><font size="2">Xiaodi Wu <</font><a href="mailto:xiaodi.wu@gmail.com" target="_blank"><u><font size="2" color="#0000FF">xiaodi.wu@gmail.com</font></u></a><font size="2">></font><font size="2" color="#5F5F5F"><br>To: </font><font size="2">Carl Brown1/US/IBM@IBM</font><font size="2" color="#5F5F5F"><br>Cc: </font><font size="2">Drew Crawford <</font><a href="mailto:drew@sealedabstract.com" target="_blank"><u><font size="2" color="#0000FF">drew@sealedabstract.com</font></u></a><font size="2">>, Jonathan Hull <</font><a href="mailto:jhull@gbis.com" target="_blank"><u><font size="2" color="#0000FF">jhull@gbis.com</font></u></a><font size="2">>, swift-evolution <</font><a href="mailto:swift-evolution@swift.org" target="_blank"><u><font size="2" color="#0000FF">swift-evolution@swift.org</font></u></a><font size="2">></font><font size="2" color="#5F5F5F"><br>Date: </font><font size="2">03/25/2017 12:01 AM</font><font size="2" color="#5F5F5F"><br>Subject: </font><font size="2">Re: [swift-evolution] [Review] SE-0159: Fix Private Access Levels</font><br><hr width="100%" size="2" align="left" noshade><br><br><br>On Fri, Mar 24, 2017 at 11:55 PM, Carl Brown1 <<a href="mailto:Carl.Brown1@ibm.com" target="_blank"><u><font color="#0000FF">Carl.Brown1@ibm.com</font></u></a>> wrote:
<p>My point is that, in rolling back the specific portion of SE-0025, case-sensitive find-and-replace will be the trickiest thing in most codebases, save those that result in invalid redeclarations. The behavior of the resultant code is, unless I'm mistaken, provably unchanged.
</p><p></p><p></p></ul><br>
<p></p><p><br>
</p><p></p><p></p></div>
</blockquote></div><br></div></div>