4 ms·
I enjoy Lisp and Lisp-alike languages specifically because with the right editor support you can do a lot of this kind of structural editing stuff without givin
by cfiggers 2y ago
I enjoy Lisp and Lisp-alike languages specifically because with the right editor support you can do a lot of this kind of structural editing stuff without giving up the niceties of source code as text.
- mtreis86 2y agoYeah in emacs with paredit/smartparens/parinfer or whatever, it is both text and structure. With parinfer you change the text and the structure gets modified to match. With the other two you can change the structure directly with a command that has a silly but descriptive name like slurp or barf.
- 0x1ceb00da 2y agoYou don't need s-expressions for that. Jetbrains IDEs provide this functionality for all supported languages, even bash.
- nyir 2y agoWhile they're very good compared to the alternatives, I wonder why they haven't pushed more into that direction, e.g. what I've wanted to put into a plugin when tinkering with the PSI was simple composable operations, similar to Vim operations, like "rotate if/else branch" (while correctly negating and simplifying the test expression), or "convert if to case/switch/..." (and back and only if it's feasible).
- klibertp 2y agoYou don't need s-exps (Lisp) for this; it turns out you just need a good parsing framework. Here's the proof: https://www.masteringemacs.org/article/combobulate-structured-movement-editing-treesitter https://www.masteringemacs.org/article/combobulate-structure...