Walter's Guide to Translating Code From One Language to Another

Patrick Schluter Patrick.Schluter at bbox.fr
Sat Sep 22 06:34:37 UTC 2018


On Friday, 21 September 2018 at 06:24:14 UTC, Peter Alexander 
wrote:
> On Friday, 21 September 2018 at 06:00:33 UTC, Walter Bright 
> wrote:
>> I've learned this the hard way, and I've had to learn it 
>> several times because I am a slow learner. I've posted this 
>> before, and repeat it because bears repeating.
>
> I find this is a great procedure for any sort of large 
> refactoring -- minimal changes at each step and ensure tests 
> are passing after every change.
>

Also, use a git commit for each logical change. If you discover a 
change that should have been put in a previous commit, use rebase 
--interactive to put it in right commit (of course that branch 
you're working on is purely local). Only when all the changes 
have been made can you decide to squash or not, or reorder them, 
or push them partially.

TL;DR

git can help to organize the refactoring, not be solely a 
recording device.



More information about the Digitalmars-d mailing list