News for hackers. Stuff that matters.
Re:Difftastic: Syntax-aware structured diff tool by Wilfred on Thursday July 08, 2021 @12:03PM (#27773822)
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.
Re:Difftastic: Syntax-aware structured diff tool by maw on Thursday July 08, 2021 @04:24PM (#27777143)
When 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."