There are a lot of valid complaints about YAML, but I still reach for it when I really only need a barebones configuration file.
There are a lot of valid complaints about YAML, but I still reach for it when I really only need a barebones configuration file.
Could not disagree more strongly and it seems many others in software agree, based on this comment section and the original article.
> It's easy to serialize complex objects to, and comes bundled with Ruby's runtime.
I don't know that Ruby support is why it's widely adopted. Ruby is common in some spaces, but not a wildly popular language at all.
I honestly think some popular project (maybe Docker Compose or something from HashiCorp?) used it for a config file and then everyone else started doing it too.
They sure do! But lots of people also agree, as evidenced by people continuing to use it. The world keeps turning, and we engineers keep using suboptimal things.
> I don't know that Ruby support is why it's widely adopted. Ruby is common in some spaces, but not a wildly popular language at all.
Ruby’s now gone out of fashion, but it was the most popular web development language (especially among startups) for the better part of a decade. It’s conjecture, but I wouldn’t be remotely surprised if Ruby brought YAML into a lot of shops by virtue of bundling it. Docker (and Docker Compose) came into full force a few years into Ruby’s peak, so it’s the egg to Ruby’s chicken. And we’ve all forgotten that Hashicorp was originally a Ruby shop!
Kubernetes maybe? It also supports JSON but JSON is less friendly to manual editing and source control IMO.
Anyway, sure, a lot of people in software disagree. For almost any opinion you might have, you could find many to agree, and many to disagree.
Requires some amount of legibility out of the box due to whitespace requirements.
Can store complex data structures (and even direct JSON).
Allows comments.
which makes it terrible due to semantic whitespace rules.
parsers shouldn't care about legible whitespace
linters should care about legible whitespace
It comes bundled with something. Question answered.
TOML may get more popular due to Rust.