Open or opened 2 years ago
interesting idea, I will think about it.
Our current definition of diff size is the number of nodes in the diff data structure. The structural editing examples you show above do not actually reduce the diff size, but increase them.
Hey, great library, thanks for your work!
I'd like to create edit scripts for Clojure code patches. Would it be feasible to add operations for structural editing? I'm thinking mainly about the following ones, tho there are some others.
expr
->(expr)
(foo expr bar)
->expr
(foo) expr
->(foo expr)
(foo expr)
->(foo) expr
Each could work for vectors and sets as well.
Example:
would result in a cheaper sequence of operations:
Another example:
would become something like