|
|
|
|
|
by benjaminbrodie
2527 days ago
|
|
It's a good question and even if the text approach is superior we need a better reason than typically given. I mean think about it. Suppose you want to communicate a JSON object to another programmer. You can say: "the object consists of three key value pairs, the first key is named ... and its value is ..., the second ..." Or you can say: "the object is that which you get from parsing the string that spells thus: curly bracket, space, double quote, ..." Of course you'd prefer the former approach! Why then when we wish to communicate to a computer the same object, we adopt the "spelling approach"? |
|
{"x":"bar", "y":"foo", "z":"foobar"}
Not the clearest way of communicating it?
For similar reasons, mathematical notation is used instead of explaining equations in plain English, despite mathematicians' audience not being computers.
Symbolic notation has value: while it takes more initial effort to understand, once you have grasped it, the result is far more concise, unambiguous and generalizable.