2 ms·
AST 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
by jstimpfle 4y ago
AST 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.