To me, it's one of those things people often do because it _feels_ nice, but when you really think about it the benefits are often very small (and the costs are quite high). The most obvious benefit is that the yaml data can be parsed by other programs, but is anyone really going to do that?
For an example of what I mean, is [1] (plus all the supporting code) really a better DX than [2] (which is also simpler to implement and much easier to debug and modify)?
[1]
work:
# Can't use markup or code in most of these fields, even if I wanted to.
- organization: X Company
position: Senior Developer
url: https://example.com
location: Remote / New York, New York
startDate: 2021-08-01
endDate: "present"
highlights:
- "Any markup I use here needs to be `eval`ed, and I don't get syntax highlighting etc."
[2] == Work Experience
#workinfo(
organization: "X Company",
position: "Senior Developer",
url: "https://example.com",
location: "Remote / New York, New York",
startDate: "2021-08-01",
endDate: "present",
highlights: (
[I don't need to use `eval` any more],
[etc...]),
)
#workinfo(etc...)Edit: Also, there was the benefit of JSON schema for validation, I guess.
// Change this to switch languages
#let selectedLang = "en"
#let lang(..arguments) = arguments.named().at(selectedLang)
#workinfo(
position: lang(en: "Senior Developer", es: "Señor Developer"),
etc...
)