3 ms·
To me YAML is the ideal human readable structured data representation format, at least for humans with sufficient visual acuity to pickup whitespaces. I've hear
by hliyan 10y ago
To me YAML is the ideal human readable structured data representation format, at least for humans with sufficient visual acuity to pickup whitespaces. I've heard people hate it with a passion, but I could never get them to justify said hate except to say that it's "ugly", "unmanageable" or "primitive".
- rectang 10y agoThe YAML spec is a ridiculous hodge podge. It's a factory farm packed with feeping creatures. The kind of person who cares about that sort of thing is the kind of person who hates YAML passionately.
- crdoconnor 10y agoIt sadly is, but the core syntax of YAML IMHO is still nicer than any other. To that end, I wrote a parser that simply cuts out the crappy features leaving just the basic core (and added optional type-safety/validation): https://github.com/crdoconnor/strictyaml https://github.com/crdoconnor/strictyaml I also tried to write up a more extensive justification for anybody who scratching their head trying to decide which config format to use (including a "why not HOCON" paragraph): https://github.com/crdoconnor/strictyaml/blob/master/FAQ.rst https://github.com/crdoconnor/strictyaml/blob/master/FAQ.rst
- rectang 10y agoNice project! I agree about the YAML core syntax. And your FAQ is so well argued that I submitted it to HN: https://news.ycombinator.com/item?id=14318472 https://news.ycombinator.com/item?id=14318472
- crdoconnor 10y agoThanks!
- js8 10y agoI don't particularly like YAML because whenever I see something written in YAML, it's not completely obvious to me how to modify it. When I see JSON, I can sort of remind myself of the syntax: OK, things are comma separated, braces are matched, keys/strings are quoted, and that's it. When I see YAML, I have to open some manual page with the syntax. (Ditto for anything with "vague" syntax like Wiki, Markdown, etc.) I personally think that "vague" syntax is a bad thing in computer languages, and it's better to keep syntax to rather obvious minimum. Like in s-expressions, for example.