3 ms·
> It's much more pronounced when you have more than one or two levels of nesting. Yes. That's a clear indication that either you configuration type structure i
by marcosdumay 3y ago
> It's much more pronounced when you have more than one or two levels of nesting.
Yes. That's a clear indication that either you configuration type structure is badly designed, or that you aren't trying to create a configuration type and should use some data encoding or programing language that fits your problem better.
I guarantee you the people using your software will curse you every time they try to edit a YAML file with more than 3 levels of nesting.
- camgunz 3y agoI confess I feel strongly in opposite directions on this. I'm pretty biased against YAML: I think it's way way too complex, and its "declarative" nature and broad feature set essentially make it a complexity magnet. I've seen hellish YAML files, and it's also pretty common to combine them with Jinja (or w/e) for extra hellsauce. But it's declarative, which is really cool! What else would you realistically use for like, AWS infra? The JSON version is so much worse. Using Python or whatever is its own can of worms. This is the kind of thing that stuff like CUE and Dhall are aiming at, and I welcome it. It feels like they're the way out here.
- marcosdumay 3y ago> But it's declarative, which is really cool! What else would you realistically use for like, AWS infra? Programing languages can be declarative too. As you already pointed, CUE and Dhall exist. (And lisp, and prolog...) (And in fact, a lot of people just use Dhall anyway and derive the actual configuration files from it.)
- camgunz 3y agoTrue, I meant more non-Turing-complete but you're right. Also I do like using Lua for config when I can, so that's another point in that column.