Replies: 2 comments 5 replies
-
In general, you don't have quite as much nesting in a KDL document in the first place, due to the richer structure of a node. That is, rather than: {
"type": "foo",
"children": [
{
"type": "bar",
...
},
{
"type": "baz",
...
}
]
} You get the simpler:
So the benefit of omitting the |
Beta Was this translation helpful? Give feedback.
-
I’m pretty strongly opposed to significant indentation. This is something I very intentionally left out because I consider it an incredibly painful part of working with YAML, where a slight misalignment in a large config file can lead to serious consequences. The aesthetics of a } cascade are insignificant in the face of genuine foot guns (and the added mental overhead of constantly having to double-check to protect yourself) |
Beta Was this translation helpful? Give feedback.
-
The FAQ correctly identifies one of the issues that YAML has with its significant whitespace
https://kdl.dev/#faq
But then for smaller files significant whitespace beats all those empty lines with closing
}
taking too much space to signal indentationWhat about optional significant whitespace for children? Then if your document is very large, you use
{
}
just like now, and if not - then you can use indentation to signal the same info (or you have some other rule when to use what).Beta Was this translation helpful? Give feedback.
All reactions