|
|
|
|
|
by dm_0ney
1796 days ago
|
|
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) |
|