Re:YAML: probably not so great after all (2017)
by ajmurmann on Wednesday June 20, 2018 @09:13PM
(#17361271)
I believe Douglas Crockforf used to make the argument that JSON is not meant for human consumption and thus shouldn't be changed to better serve humans. I personally wish hjson (https://hjson.org) were to get more traction. I prefer it over both JSON and YAML.
[ Parent
| on HN ]
Re:YAML: probably not so great after all (2017)
by jasonjayr on Wednesday June 20, 2018 @09:23PM
(#17361309)
It was Crockford. Directly from him:
> I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn't.
https://plus.google.com/+DouglasCrockfordEsq/posts/RK8qyGVaG...
Re:YAML: probably not so great after all (2017)
by Mikhail_Edoshin on Friday June 22, 2018 @06:43AM
(#17372944)
Well, then why not to allow a trailing comma in lists and objects? Computers don't care and they would even be happier, because they can then just pour array and object members with a trailing comma without concerning themselves whether this is the last member or not. (Dijkstra's train toilet problem comes to mind.) Also compare with XML, where each element is self-contained.
And why to model JSON syntax closely after JavaScript literal object syntax (which is actually more convenient, by the way) which, being taken from mainstream programming languages, naturally evolved to be written by humans in small amounts not by computers in large dumps? :)