Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Following what you say we should only have binary format.

I think you underestimate the convenience of a text format.

It does not only provide a simple way to generate it, but also provide a way to modify it by hand.



And have readable and understandable diffs!

One of the biggest issues with the most popular 'tool-only language' (Excel) is that there is no reasonable way to audit changes. Same goes for UIs that are backed by inscrutable file formats.


Readable and understandable diffs is not a property of text files. It is very easy to design tools and formats that use text files, yet do not give you diffs that are readable or understandable.

Readability and understandability depend on more strict requirements that a text file format may or may not have. Many do, but far from all do.

For instance, JSON files do not have requirements on the ordering of keys. When making a small change to a JSON file, it is entirely legal to reorder every single key, completely destroying the diff, and an automatic tool may very well do this.

And as a counter-example, we could easily use a binary representation of JSON data, but use a diffing tool that normalises key ordering to provide diffs that are more readable and understandable than a text diff of a JSON file, even without malicious reordering of lines.


But this means you need diff tools, version control systems and editors (edit: and merge tools) for every single format, which while nice in theory (hey plugins!), in practice doesn't work well. Text is nice because it sort of a minimum common denominator.

Of course semantic diffs would be nice; even, or especially, for code for example but while they do exist they haven't seen much uptake because they do not integrate well with existing tooling.


And it's also easier to debug human readable text then it is to debug raw binary. Text is such a good abstraction layer that we almost never have to deal with character encodings, etc. Only problem is that it has to be parsed twice, first from binary to text, then from text to whatever. But computers are good at such tasks, while humans are not.


Following what you say we should only have binary format.

Only if you ignore the bit where I said "once you hit a moderate level of complexity". Text file formats work really well for simple things.


Yeah I had to hand edit some IOS ui stuff when a version diff caused problems. human readibility even if difficult is beneficial. Useful for generating diffs as well




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: