And, on that note, I think that if I could pick as single thing that irritates me the most about YAML, it's that it isn't actually a ML.
And, on that note, I think that if I could pick as single thing that irritates me the most about YAML, it's that it isn't actually a ML.
The problem is that XML is ill-suited for configuration files.
If we're limiting ourselves to just JSON, INI, XML and YAML as potential choices, I get why people cling onto one of these suboptimal choices and then fiercely defend it, but there are other options. There's libconfig, JSON5, Dhall, various interpreted languages...
Sadly these alternatives are far from mainstream and have no support in standard libraries, so I think most developers will continue to pick whichever common option's issues they can deal with.
But at the end of the day that's not possible because reality intrudes. You give up a lot for that lack of verbosity, not everyone will agree that it's a worthy tradeoff.
Why?
I don't understand your comment.
Compare ansible vs helm vs github actions vs literally anything with nontrivial config.
Note that if you asked me for real, I'd be a dhall proponent, but most normal people look at me funny the first time they hear it and then the second time they see the syntax.
“YAML ain't markup language” is kinda the whole point.
First draft: https://yaml.org/spec/history/2001-03-30.html
Last draft calling it that: https://yaml.org/spec/history/2001-12-10.html
First draft with the new acronym: https://yaml.org/spec/history/2002-04-07.html
That is, if the value is something you would expect to be able to show to a user, then it probably shouldn't be at attribute. If it is a value that changes how you would show it, then attribute makes a lot more sense.
I also think a strong adherence to any preference between attribute and markup is a touch too dogmatic. The only real distinction at the language level is if you allow children, or not. If it can have children, it pretty much has to be a child and not an attribute.
<foo>
<bar>1</bar>
<bar>2</bar>
<baz>3</baz>
<baz>4</baz>
</foo>