▲ | eximius a month ago | |
For you, perhaps. For me, the former is denser, but crossing into a "too dense" region. The JSON has indentation which is easy on my poor brain. Also, it's nice to differentiate between lists and objects. But, I mean, they're basically isomorphic with like 2 things exchanges ({} and [] instead of (); implicit vs explicit keys/types). | ||
▲ | josephg a month ago | parent | next [-] | |
Yeah. I don’t even blame S-expressions. I think I’ve just been exposed to so much json at this point that my visual system has its own crappy json parser for pretty-printed json. S expressions may well be better. But I don’t think S expressions are better enough to be able to overcome json’s inertia. | ||
▲ | em-bee a month ago | parent | prev [-] | |
even as a fan of s-expressions (see my other comment), i have to agree. but the problem here is the formatting. for starters, i would write the s-expression example as:
the alignment of the values makes them easier to pick out and gives a visual structurebut, i would also argue that the two examples are not equivalent. what is explicitly specified as "type" and "value" in the json data, is implied in the s-expression data. either format is fine, but it would be better to compare like for like: an s-expression equivalent for the json example would look like this:
or the reverse, a json equivalent for the s-expression example:
a lot of the readability depends on the formatting. we could format the json example more dense:
doing that shows that the main problem that makes json harder to read is the quotes around strings.because if we spread out the s-expression example:
that doesn't add much to the readability. since, again, the primary win in readability comes from removing the quotes. |