News for hackers. Stuff that matters.
Re:Difftastic, the fantastic diff by rossmohax on Wednesday September 07, 2022 @07:10AM (#32749053)
Next step is to make an editor where we type/edit AST, not text.
Re:Difftastic, the fantastic diff by leloctai on Wednesday September 07, 2022 @07:15AM (#32749095)
Have you heard about our Lord and savior S-expression?
Re:Difftastic, the fantastic diff by rossmohax on Wednesday September 07, 2022 @07:28AM (#32749195)
That's for Lisp only, I am talking about generic editor for any language with structure.
Re:Difftastic, the fantastic diff by jstimpfle on Wednesday September 07, 2022 @08:19AM (#32749621)
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.