Yeah slurping and barfing in Paredit are quite similar to basic restructuring operations in tylr, eg selecting a parenthesis and moving it somewhere else. Some differences:
(1) In tylr you move the parenthesis itself, rather than making the parenthesized term slurp/barf its neighbors. This may seem like a minor difference for simple operations like this but I think it's an important primitive UI metaphor that makes the editing experience feel more direct/linear/text-like rather than you having to translate your editing goal into operations on the AST.
(2) tylr generalizes beyond S-expressions to infix operator sequences and other multi-sorted syntactic forms (eg it understands you shouldn't be able to move expression forms in patterns).
(3) tylr generalizes beyond parenthesis moving to near-arbitrary range selection moving, eg I could make the selection (specified by the square brackets)
`( 1 + 2[) * (]3 + 4 )`
and directly move it over to give
`( 1[) * (]_ + 2 + 3 + 4 )`
(where tylr has inserted a hole `_` to keep things well-formed)
Reasonable question given the usual approach to structure editors, which have users directly modify the AST. tylr adopts a more indirect approach, where your program is presented in an alternate (modal) tile-based syntax with its own syntax-directed editing. The point of this indirection is to give you more text-editor-like flexibility, but unlike text tylr makes sure you can always (in the default mode) transform your program from the tile-based syntax to the abstract syntax.
It might help to think of restructuring mode, the mode automatically entered upon constructing `(`, as a transactional editing mode in which you specify your AST-to-AST transformation.
Yeah! For one thing, tylr makes it possible to make sub- and cross-structural selections, which isn't possible in other structure editors. Try typing `2 + 3 * 4` in MPS and selecting `* 4` or even `2 + 3`—you can't because they don't correspond to abstract syntactic terms. tylr understands these sorts of arbitrary range selections and makes sure you manipulate them in reasonable ways (eg see https://twitter.com/dm_0ney/status/1414742962442014720?s=20).
(1) In tylr you move the parenthesis itself, rather than making the parenthesized term slurp/barf its neighbors. This may seem like a minor difference for simple operations like this but I think it's an important primitive UI metaphor that makes the editing experience feel more direct/linear/text-like rather than you having to translate your editing goal into operations on the AST.
(2) tylr generalizes beyond S-expressions to infix operator sequences and other multi-sorted syntactic forms (eg it understands you shouldn't be able to move expression forms in patterns).
(3) tylr generalizes beyond parenthesis moving to near-arbitrary range selection moving, eg I could make the selection (specified by the square brackets)
`( 1 + 2[) * (]3 + 4 )`
and directly move it over to give
`( 1[) * (]_ + 2 + 3 + 4 )`
(where tylr has inserted a hole `_` to keep things well-formed)