Why I prefer human-readable file formats

21 points by runxiyu


riki

The points presented in the article are very valid, but there’s a counter-point: how would you choose to represent something like an image file in a human-readable manner? Sure you could encode it into a JSON array, but that would be very inefficient.

The apparent simplicity of human-readable formats can also be deceiving. Underspecified formats like JSON are notorious for having differing behaviour across parsers. On the other hand reading a binary format engineered for simplicity can be done in a remarkably compact way in code, see rxi’s simple serialisation system—and by “compact” I mean machine-sympathetic.

I personally think mechanical sympathy is just as important for longevity as is maintainability by humans.