News for hackers. Stuff that matters.
Re:Myers Diff Algorithm – Code and Interactive Visualization by adekok on Monday July 03, 2017 @03:56PM (#14690941)
i.e.:

1) convert code sample 1 to AST 2) convert code sample 2 to AST 3) do text-based diffs while paying attention to the ASTs

A closing brace is really part of the function started by the function definition and opening brace. As such, a closing brace from function X should never "match" an opening brace from function Y.

I imagine that simple chopping code into multiple text blocks, one for each function, before passing it to a "diff" routine would accomplish most of that. After all, we already chop code into text blocks by filename...

Re:Myers Diff Algorithm – Code and Interactive Visualization by slavik81 on Monday July 03, 2017 @04:29PM (#14691146)
Chopping up the code by function is not enough. The same problem exists for blocks within functions, like with a sequence of if statements.
Re:Myers Diff Algorithm – Code and Interactive Visualization by adekok on Monday July 03, 2017 @04:46PM (#14691233)
Yes... that should go without saying.