Live data from Hacker News

YAML: Probably not so great after all

arp242.net

21–30 of 457 posts

Re: YAML: Probably not so great after all

#21

If the JSON and YAML folks can’t get along, I swear I’ll turn this car around and make you all use XML.

Aren't we just reinventing the wheel, though? Got your structured data format, now you need parsers (tons available for XML, incl SAX, DOM parsers, SimpleXML, Nokogiri...) a schema and validation tools (XSD), a templating mechanism (XSLT), a query language (XPath), ... JSON was a reaction to the verbosity of XML, but a better reaction would have been to work harder on our text editors so that working with XML would b…

I think that XML is often used for stuff that it shouldn't be used for. It could be almost OK (there are still a few problems though) for stuff containing text with other stuff inside that may in turn contain text, and so on. For other stuff, JSON or RDF or TSV or other formats can be good.

Re: YAML: Probably not so great after all

#22
post #5

Heh, yaml haters unite! I wish yaml would go away.

I hate yaml but I have yet to find a better option for deeply nested confog files. Toml is the closest thing I have seen. Toml support is also not that great.

Yaml despite its flaws works pretty well for Ansible playbooks and for storing localizations.

Re: YAML: Probably not so great after all

#24

If the JSON and YAML folks can’t get along, I swear I’ll turn this car around and make you all use XML.

inb4 YAML adds "Yeah, nah." and "Nah, yeah." as boolean values. Interpretation is locale dependent.

That's why StrictYAML always interprets as string unless there's a schema. Cuts out the surprise type conversions.

Re: YAML: Probably not so great after all

#25
post #20

Earlier quoted context omitted.

Aren't we just reinventing the wheel, though? Got your structured data format, now you need parsers (tons available for XML, incl SAX, DOM parsers, SimpleXML, Nokogiri...) a schema and validation tools (XSD), a templating mechanism (XSLT), a query language (XPath), ... JSON was a reaction to the verbosity of XML, but a better reaction would have been to work harder on our text editors so that working with XML would b…

> JSON was a reaction to the verbosity of XML, but a better reaction would have been to work harder on our text editors so that working with XML would be just as easy as working with JSON in terms of the numbers of keystrokes needed. Isn't that only solving half the problem? XML is also pretty difficult to read

Look. I am just a web guy.

But why is XML so freaking great? We can’t even tell if whitespace is significant or not. If a schema says it’s insignificant then that’s that!

https://www.oracle.com/technetwork/articles/wang-whitespace-... That alone is TERRIBLE! (Same problem with YML.) Why should I bother with that? JSON can encode strings, hashes, arrays etc. in a way that’s instantly interoperable with JS and is far far more unambiguous.

What exactly is so great about XML that you can’t do with JSON in a better way? Schemas can be stored in JSON. XPATH can specified for JSON. Seriously I never got the appeal of XML except that it was first.

Re: YAML: Probably not so great after all

#26
Disclosure: I work on Tree Notation. It’s the future of file formats, IMO.

The idea is to have 2 levels: a simple, minimal syntax/notation (think binary) called Tree Notation, and then have higher level grammars on top of that, called tree languages.

It works for encoding data and also for programming languages, regardless of paradigm.

https://github.com/treenotation/jtree

Post reply on HN