5 ms·
I like the idea of editing AST directly instead of just plain text. JetBrains MPS[1] is an editor based on the same principle (but much more mature). Also, the
by janjones 4y ago
I like the idea of editing AST directly instead of just plain text. JetBrains MPS[1] is an editor based on the same principle (but much more mature). Also, the Unison language stores its code only as AST, not text[2].
[1] https://www.jetbrains.com/mps/ https://www.jetbrains.com/mps/
[2] https://jaredforsyth.com/posts/whats-cool-about-unison/#Code-is-stored-as-a-structured-type-checked-tree-in-a-database-not-as-text-in-files https://jaredforsyth.com/posts/whats-cool-about-unison/#Code...
- cmrdporcupine 4y agoI keep hoping JetBrains will fold some of the interesting ideas in MPS into their more mainstream editors.
- jhgb 4y agoI guess people do keep reinventing Interlisp-D every decade.
- ianai 4y agoApparently this lives on as Medley https://interlisp.org/ https://interlisp.org/ . Was modifying the AST part of the GUI explicitly?
- cmrdporcupine 4y agoLisp has the property that the 'AST' is effectively 1:1 with the program code. In Algol-descended languages like C, Java etc, the expression tree can look quite structurally different from the program due to precedence rules etc. I think a tree-style editor for a more conventional PL would have to apply some transformations on the AST for display purposes, for programmer comfort.
- jhgb 4y agoThere's not really a lot of difference between Algol descendants and Lisp in this case if you look at problem as one of building a projectional editor.
- mananaysiempre 4y agoSee the authors’ talk[1] and essay[2] for how this improves on MPS and uses a different principle (the representation Tylr edits is not exactly the tree). For example, MPS does not permit you to select “2 + 3” in “1 * 2 + 3” but Tylr does. [1] https://liveprog.org/live-2021/Restructuring-Structure-Editing.mp4 https://liveprog.org/live-2021/Restructuring-Structure-Editi... [2] https://tylr.fun/essay/ https://tylr.fun/essay/