Re:Flattening ASTs (and Other Compiler Data Structures)
by Solvency on Sunday July 02, 2023 @10:37AM
(#36561866)
I don't get it. Surely if you ever needed to, you could write an interpreter for loading tbe older files if you decided to abandon this 1:1 representation?
Re:Flattening ASTs (and Other Compiler Data Structures)
by amomchilov on Sunday July 02, 2023 @11:12AM
(#36562158)
I think the effort involved disincentivizes against it, and nudges people towards defensively adding spare fields or whatever.
The other comment pointed out that you can make a fall back migration code path that migrates over older file versions. That's the escape hatch if you have no other options
Re:Flattening ASTs (and Other Compiler Data Structures)
by dragontamer on Sunday July 02, 2023 @01:08PM
(#36563376)
You ever hear of .doc files?
https://learn.microsoft.com/en-us/openspecs/office_file_form...
Yeah. There is a reason XML was seen as the future back in the 90s.
Custom databases often get extended into custom filesystems. And these systems on top of systems get obscure features (like embedding excel sheets inside of Word) and... Thing get hairy.
It was a complete pain in the ass. You were constantly future-proofing your data structures because you knew you were going to be stuck with them for all eternity because the I/O framework was going to serialize them verbatim whether you liked it or not. Those were dark days...