Compiler updating user code
H. S. Teoh
hsteoh at quickfur.ath.cx
Fri Mar 14 07:38:05 PDT 2014
On Fri, Mar 14, 2014 at 12:07:24PM +0000, John Colvin wrote:
> On Friday, 14 March 2014 at 11:44:21 UTC, Daniel Murphy wrote:
> >"Manu" <turkeyman at gmail.com> wrote in message
> >news:mailman.105.1394774104.23258.digitalmars-d at puremagic.com...
> >
> >>So it comes up fairly regularly that people suggest that the
> >>compiler should have a mode where it may update user code
> >>automatically to assist migration to new compiler versions.
> >>
> >>I'm personally against the idea, and Walter certainly doesn't like
> >>it, but it occurred to me that a slight variation on this idea might
> >>be awesome.
> >>
> >>Imagine instead, an '-update' option which instead of modifying your
> >>code, would output a .patch file containing suggested amendments
> >>wherever it encountered deprecated code... The user can then take
> >>this patch file, inspect it visually using their favourite merge
> >>tool, and pick and choose the bits that they agree or disagree with.
> >>
> >>I would say this approach takes a dubious feature and turns it
> >>into a spectacular feature!
> >
> >If you're using version control, these are practically the same
> >thing.
>
> 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?
I believe the point is to let the user *selectively* apply the diffs.
A VCS doesn't help you in that area -- you either apply the entire set
of changes, or nothing at all (at least within a single file).
T
--
Two wrongs don't make a right; but three rights do make a left...
More information about the Digitalmars-d
mailing list