Very cool work on a typed structure editor present...
# linking-together
x
Very cool work on a typed structure editor presented yesterday at POPL: https://www.youtube.com/live/Jff0pIbj8PM?si=aB3FVyPyoLlx9ndZ&t=6092 With a demo available online here: https://pantographeditor.github.io/Pantograph/ I just worked through the tutorial myself, it's very pleasant to use overall.
j
Just looking at the video, I don't feel like I have an intuition for what cutting a selection or pasting it will actually do. I'm not thinking in trees when I'm looking at text. Does that get easier with practice? If you are going to navigate and manipulate it as a tree, why not display it that way?
x
I personally found it easy to grasp, probably because I'm used to having syntactic cursor movement in my day-to-day text editor. I found the demo to be a bit strange at first, but I got the hang of it relatively quickly. Still not sure how efficient I'd be with it in a normal context, but the only way to know would be to use it for a few weeks at least.
Also as for why not display it as a tree, I think in some sense it is, actually. You wouldn't want to edit code that's displayed as a tree with lines connecting nodes, so in practice it's better to do something more compact, and which conveys the semantics of the code. For example, having a new line for each
let
expression make sense in terms of high-level organization, but splitting function calls across multiple lines makes no sense most of the time. It's more readable to put everything closely together, even if it hides the tree structure a bit more.