back

by jtwaleson·1y ago·view on hn ↗
Same! I think we need to free "code" from files, characters, tabs/spaces and variable names. Put millions of ASTs in a database. Imagine how much cheaper and better AI code assistants can be if they can only generate valid code with their "next token".
2 comments
At some point the AST needs to be serialized as bytes on disk. In the big picture, the cost of having that serialization format be also human readable is relatively small as long as the syntax is designed to be sane (i.e. not c++/perl)
> Put millions of ASTs in a database.

That's basically what unison does, they store the source code in binary format in an sqlite database.