3 ms·
>I'm not sure if this is what you're saying, but I think the AST is not meant for "human" consumption, but also, translations that result in alternative and rad
by mikewarot 4y ago
>I'm not sure if this is what you're saying, but I think the AST is not meant for "human" consumption, but also, translations that result in alternative and radically different representations between what you see and what I see can be problematic.
File systems aren't meant for human consumption either, they're a practical solution to the need to store various bits of data on a disk in a coherent manner. We've made tools for representing the inodes and other structures in human readable form. We also represent them visually.
We can do the same for the AST. It doesn't have to be a dump of the structure, a tool just has to present a view that is close enough for our brains to impedance match, and we're off to the races.
- the_af 4y agoIsn't a text file representation -- what you and I see when we open a text editor -- already an abstraction for human consumption? They are not filesystem-level storage. You can view an AST, but this is never going to supplant a textual representation of code as a lingua franca between you and me. A tool that represents ASTs is always going to be a boundary between you and me (and also, a more complex tool than a simple text editor).