3 ms·
We could stop storing code as text, just store an AST and let the editor parse it and render it respecting the preference of the user (I think this is a terrib
by williamdclt 6y ago
We could stop storing code as text, just store an AST and let the editor parse it and render it respecting the preference of the user
(I think this is a terrible idea, but also got me thinking if there's something interesting there)
- falcolas 6y ago> We could stop storing code as text Why is this terrible? Syntax errors would no longer exist, it would allow editors to work directly with the AST and not text... I think this is a fine idea personally. Our current editors already try to do this - letting you work with syntax and not text - via smart completions, boilerplate templates, and syntax highlighting. Working with an AST directly is only taking it a step further (and better, it removes the reliance on context-insensitive regex based tooling in the editors).
- em-bee 6y agodidn't some variants of BASIC do this? smalltalk is storing the code together with the compiled result in an image, so it could do the same, but i am not aware of any implementation that does that.