logoalt Hacker News

zokieryesterday at 9:52 AM1 replyview on HN

> At this point, the question is: why keep files as blobs in the first place. If a revision control system stores AST trees instead, all the work is AST-level.

The problem is that disks (and storage in general) store only bytes so you inherently need to deal with bytes at some point. You could view source code files as the serialization of the AST (or other parse tree).

This is especially apparent with LISPs and their sexprs, but equally applies to other languages too.


Replies

rs545837yesterday at 11:55 PM

Source code is already a serialization of an AST, we just forgot that and started treating it as text. The practical problem is adoption: every tool in the ecosystem reads bytes.