Hacker News new | ask | show | jobs
by coldtea 3214 days ago
>It's cool, but it has some major downsides too. For example, MPS stores the source as XML, not text (since it isn't text, it's a tree). This makes lots of basic tools we've taken for granted a lot harder, such as git merging etc. They've had to make a custom mergetool just to make basic collaborative coding feasible.

Doesn't solving this just require a text-to-AST, AST-to-text input and output step?

Anyplace outside the editor the programmer just sees regular text.

1 comments

The issue with this is that operations on text don't necessarily preserve a valid AST. Doing `git merge` on the plain text of a source file may result in invalid code, at which point you have other annoying questions to answer about how to handle text that doesn't parse into a valid AST.