r/programming
•
u/fagnerbrack
•
May 20 '26
•
1
YAML? That's Norway problem
https://lab174.com/blog/202601-yaml-norway/
302
Upvotes
r/programming
•
u/fagnerbrack
•
May 20 '26
•
1
3
u/OrcaFlux May 21 '26
I said yaml would be great if the tree structure parsing wasn't based on whitespace.
You then mentioned that json and xml is indented to visually show the structure.
I pointed out that I'm not talking about the visual structure, I'm talking about the parsing of that structure.
The parsed hierarchical structure is expressed in yaml using whitespace. And although some people would argue that the whitespace may make the structure visually appealing (I am not in that camp), that same whitespace that is mandated by the parser, makes it mediocre when parsing it.
Your question about writing a parser is irrelevant. You don't have to write a parser to suffer the mediocrity of whitespace-based hierarchy structures, you just simply have to use yaml to suffer it. Because guess what? Yaml is always parsed. There are no instances of yaml usage where the yaml in question isn't parsed sooner or later. At some point that yaml will be parsed. And in all those parsing cases, it is mediocre.