Hacker News new | past | comments | ask | show | jobs | submit login

Already in a tree format like lisp? Or some binary structure? Even if it's some fancy binary format, it's still going to have to be parsed by the compiler and the editor (and thoroughly checked for syntax errors), making it no better than what we already have now (just different).

And unless those node types are "green round-rectangle", then I posit that it's still syntax highlighting, since the editor is deciding how to display "string node".




Wouldn't storing and editing source code as an AST make a lot of syntax errors impossible?


User-created syntax errors, possibly. But it can't completely eliminate them:

    5 ↤ "hello"
Now you could argue that the editor might detect that and not allow it, but if your abstract syntax tree data structure can support it, then you will be handed it at some point and so you should detect it.

But more importantly, the abstract tree itself has to be stored. Whatever the format (binary or otherwise), that has to be checked, too (unless you want buffer overflows or code execution exploits in your compiler/editor).

All in all, it sounds like the same stuff compilers already have to deal with, so I don't think it wouldn't be a win there.


Or JSON. Images could be even be embedded using base64.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: