News for hackers. Stuff that matters.
Re:Difftastic, a structural diff tool that understands syntax by etbebl on Friday March 22, 2024 @02:36AM (#39787944)
> x = 4 > y = 7 > >are independent statements and the code will be no different if I replace those two statements with > > y = 7 > x = 4

Not always, e.g. in a multi threaded situation where x and y are shared atomics. Then unless we authorize C++ to take more liberties in reordering, another thread will never see y as 7 while x is not yet 4 in the first example, but not the second. This kind of subtlety can't be determined from syntax alone.

Re:Difftastic, a structural diff tool that understands syntax by thaumasiotes on Friday March 22, 2024 @02:40AM (#39787963)
OK, I tended to agree that the AST was inadequate for this task. But what are we doing with it? That's most of what I want from "structural code diff".