2 ms·
One common failure mode of previous visual code editing projects has been forcing the program to be grammatically valid at every moment, and maybe even that eac
by yencabulator 4y ago
One common failure mode of previous visual code editing projects has been forcing the program to be grammatically valid at every moment, and maybe even that each identifier is defined at all times. This doesn't always match how people like to initially write or edit programs.
- munificent 4y agoIt would be fascinating to instrument a programming text editor to capture the entire chain of user input. Then go through that log and determine: 1. How many edits don't preserve the AST structure of a program. Changing a leaf expression to a different expression does, as does, say, changing a `for` loop to a `while` loop. But cutting the `(cond)` part of `if (cond)` out (including the parentheses) and hoisting it to a separate expression does not because now those parentheses mean something different. 2. How often the program is in a grammatically invalid state across multiple edits. I suspect fans of always-valid visual editors massively underestimate the size of both of those.