3 ms·
A syntactic differ like Difftastic is very helpful when your codebase is autoformatted. Formatters often reflow code. Given the code: foo(one, two, three);
by Wilfred 5y ago
A syntactic differ like Difftastic is very helpful when your codebase is autoformatted. Formatters often reflow code.
Given the code:
foo(one, two, three);
If you add an argument and reformat:
foo(
one,
two,
new,
three
);
A line-based diff can make it hard to spot what's changed.
- maw 5y agoWhen I was still formatting code manually (... -ish; emacs did a lot of the tedious work for me) I eventually settled on a style very similar to your four-argument example, precisely because it makes diffs easier to read. For the same reason, I asciibetically sorted things when it made sense. Now I use prettier and black and I'm mostly satisfied by them, but their reflow behavior puts the lie to "[black] makes code review faster by producing the smallest diffs possible."