3 ms·
I don’t think it was an error, given how the article describes its handling of delimiters. In the example: (foo (bar)) (foo (novel) (bar)) The balanced pa
by eyelidlessness 4y ago
I don’t think it was an error, given how the article describes its handling of delimiters. In the example:
(foo (bar))
(foo (novel) (bar))
The balanced parentheses around bar “haven’t changed”, but the symbol between them “has”, and the balanced parentheses around bar were “added”. It’s a perfectly valid diff given the approach, even if it’s not ideal, as the author found.
The only way you could arrive at “novel) (” given the algorithm, I think, would be something like
(foo (bar))
(foo novel) ((bar))
(This might be off too, hard to write code on mobile)