<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 14 March 2014 22:07, John Colvin <span dir="ltr"><<a href="mailto:john.loughran.colvin@gmail.com" target="_blank">john.loughran.colvin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Friday, 14 March 2014 at 11:44:21 UTC, Daniel Murphy wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
"Manu" <<a href="mailto:turkeyman@gmail.com" target="_blank">turkeyman@gmail.com</a>> wrote in message news:mailman.105.1394774104.<u></u>23258.digitalmars-d@puremagic.<u></u>com...<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So it comes up fairly regularly that people suggest that the compiler should have a mode where it<br>
may update user code automatically to assist migration to new compiler versions.<br>
<br>
I'm personally against the idea, and Walter certainly doesn't like it, but it occurred to me that a<br>
slight variation on this idea might be awesome.<br>
<br>
Imagine instead, an '-update' option which instead of modifying your code, would output a .patch<br>
file containing suggested amendments wherever it encountered deprecated code...<br>
The user can then take this patch file, inspect it visually using their favourite merge tool, and pick<br>
and choose the bits that they agree or disagree with.<br>
<br>
I would say this approach takes a dubious feature and turns it into a spectacular feature!<br>
</blockquote>
<br>
If you're using version control, these are practically the same thing.<br>
</blockquote>
<br></div>
Yeah, I don't understand why it matters whether it's a change or a patch. Either way, all changes become patches in VCS. Who would let an automated tool make source changes without using VC, or at least having made a manual backup?<br>
</blockquote><div><br></div><div>Because Walter is acutely allergic to the idea of a tool that modifies your source code. I might also have uncommitted changes, and not particularly feel like stashing them for the moment (less easy in other VCS's).</div>
<div>I might also not want to apply all the changes, only some of them. Surely it's easier to merge the ones I want after visual approval, than reverting the ones I don't want after having gone to the effort of stashing my local changes to make a clean slate to work with...</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Also, making a direct change allows the user to use whatever diff software / version control software they like.<br>
</blockquote></div><br></div><div class="gmail_extra">I'm not sure how a patch file restricts them to a particular merge program or VCS...</div></div>