YAML (YML) Has Won

Rob Muhlestein
3 min readDec 27, 2018

--

Update Feb 13, 2020: Now that GitHub has caught up with GitLab in offering built-in services for CI/CD the use of the .yml file has really become standard. As recently as last week I was ranting about the improper use of the three-letter suffix with the specification clearly asks that people use .yml in the tradition for such (over .htm thank god). When I turned to the Docker docs — one of the most substantial users of YAML — it appears they punted saying you can use either one. But it seems the entire industry could really care less what the creators of YAML wanted for the suffix. Oh well, people have collectively been assholes for a lot longer than I care to think about and for far worse reasons. I feel for the YAML creators and wanted to support them, but it seems they have been overwhelmed by, um, everyone.

Update Jan 24, 2019: Been doing a lot of serious research on Rust (spoiler alert, it beats Go by a lot for several use cases including education). Rust’s cargo uses TOML for strong reasons. Looks like TOML is very much still a thing so I guess we all have to learn at least three configuration file formats: JSON, YAML, and TOML.

Configuration file formats put many people to sleep. I’m not one of them. An elegant and easy to read configuration file is like looking at a piece of art. Many important technologies now depend on complex configuration. Kubernetes uses YAML to define Pods, Docker swarms as well. Static blog engines have been using YAML for front matter since Jekyll started it. Phaser3 atlases use YAML. Even SpigotMC plugins have to be in YAML. It seems there is a clear winner, or is there?

The short answer is yes!

Even though I created the TOML logo and originally submitted the first Ruby INI parsing gem. I’ll be teaching YAML (along with JSON of course) to all our Coders.

I confess I had higher hopes for TOML — mostly because it does not depend on white space. But at this point YAML has a commanding lead. It clearly has emerged as the best-of-breed configuration file format, despite its quirks.

I have been watching TOML for more than a year now and the progress toward a 1.0 is just too slow. I’m not being salty, just factual. Perhaps it is as one person wrote, “anything that reminds me of INI gives me the shudders”. Fair enough.

Meanwhile, YAML 1.2 is so stable and established that it has not been patched since October 2009. When it comes to a configuration format the number one criteria is usability, the second stability. Sometimes we don’t want things to change. JSON wins for stability, but YAML is a close second. On the usability point YAML beats JSON and, at worst, ties with TOML. Therefore, YAML wins.

I’ve officially added support for YAML front matter to BaseML and our student progress profile system and will be preparing new lesson material on how to use it effectively.

Originally posted to skilstak.io.

--

--