3 ms·
> I've banged my head against the wall many times trying to figure out which line in my 500 line YAML document is not indented correctly. How are tags or brack
by seanwilson 6y ago
> I've banged my head against the wall many times trying to figure out which line in my 500 line YAML document is not indented correctly.
How are tags or brackets better here? The "urgh, where's the missing bracket!?" problem has been with us for decades and it's not likely to go away until we move from text editors to structured editors. At least you don't have the problem of misleading looking indentation when the indentation itself is the single source of truth.
- thinkharderdev 6y agoXML and JSON are not immune to similar problems, but in my experience you run into it head first with YAML more because when copy/pasting YAML stanzas from one document to another, the indentation can (and often does) get mangled. Since whitespace isn't meaningful you can paste a JSON or XML object as without the whitespace, parse the document and then reformat it to display it nicely. With YAML if the whitespace gets mangled on paste then the document can't be parsed to begin with so the tools you generally use to debug such issues are largely useless. You are effectively back to raw text.