4 ms·
Next step is to make an editor where we type/edit AST, not text.
by rossmohax 4y ago
Next step is to make an editor where we type/edit AST, not text.
- leloctai 4y agoHave you heard about our Lord and savior S-expression?
- rossmohax 4y agoThat's for Lisp only, I am talking about generic editor for any language with structure.
- jstimpfle 4y agoAST is first and foremost a representation of a parse, i.e. it shows how a serialized representation of _something_ was understood by the machine. Due to this constraint, it is unlikely to be the most convenient way for a human to input that something. Take arithmetic expressions, for example. The usual infix syntax as edited in a conventional text editor is very good, probably the best option that humans have for editing arithmetic expressions. Having to edit an AST structure explicitly would almost certainly be a loss in terms of convenience and productivity. Or take a (raster or vector) image editor. They provide interfaces to editing image data in a much more convenient way than editing AST or other internal representations directly.