Comment by pdkl95

11 years ago

Early in science education is the very important lesson that you always write units for your answers, as they are more important than any numerical value you happened to get. The best teacher I ever had liked to use an example of a simple cake recipe: "2, 8, 9, 2.5" tells you nothing, while "flour, butter, eggs, sugar" is something you could experiment with to find the specific values. The text units (labels) convey far more information.

I propose that this is one of the key reasons why text files are vastly superior to binary formats. While they end up very similar in normal use, the readability enables investigation and experimentation, while writing a raw struct out to a file keeps the meaning in the (possibly lost or unobtainable) original program files.

// if speed is needed, you can always cache the parsed version of the text file