Today in tricky diff scenarios: when do you want the inner delimiter to match, and when do you want the outer delimiter to match?
In these examples, lisp looks better with the outer paren matched, whereas rust looks better with the inner brace.
miniblog.
Related Posts
Difftastic works really hard to find similarities between the before and after file. Sometimes this works wonderfully (see first screenshot) and sometimes it goes way too far (see second screenshot).
It's matched up a few variables and semicolons from adjacent functions!
Here's another fun example where syntactic diffing really helps.
Even though the syntax has changed (`attr` was a named argument, now it's a record), the nesting has changed, and the line has changed, difftastic has successfully matched the `attr` in the code afterwards!
I've come to realise that the goal of a diff tool isn't to say what's changed. You want it to say what *hasn't* changed.
Unchanged content is crucial for deciding how to group changes into hunks and how to align lines. You need matched content pairs for this.





