2 ms·
It's not that hard if you just use common data formats. I don't have to reimplement a json or CSV parser in every language.
by schwartzworld 6y ago
It's not that hard if you just use common data formats. I don't have to reimplement a json or CSV parser in every language.
- TeMPOraL 6y agoNo, but someone else does. Every language comes with its own collection[0] of half-baked, bug ridden libraries for parsing JSON and CSV. JSON and CSV are particularly poor data formats, in that JSON has an impedance mismatch if the language you're using isn't JavaScript[1], and CSV means whatever the tool generating it think it means - it doesn't have to be comma, separated, or just values. Also, if you adopt either, you lose the benefit of human-readability, which is half of the justification for the UNIX tooling to emit plaintext in the first place. So one could as well bite the bullet and treat machine readability and human readability as separate concerns, and use formats suitable for each individually. -- [0] - It's never just one library. [1] - Do JSON objects get mapped to structs, arrays or hash tables in your language? How do you distinguish between true, false and null?