4 ms·
Stripping indentation for embedded text is probably the nicest feature YAML has. In TOML you either just forget about indenting multi-line strings (which makes
by unscaled 3y ago
Stripping indentation for embedded text is probably the nicest feature YAML has.
In TOML you either just forget about indenting multi-line strings (which makes them less readable) or you have to remember to putting a backslash at the end of each line. Neither option is ideal.
This makes YAML pretty nice for DSLs or configurations that need to embed markdown or other textual format and give it an edge over something like TOML.
But I won't put the entire blame for "YAML fatigue" on all the CI and DevOps tools that chose to use it as the carrier format for their DSLs. YAML has major issues which the OP site outlined very well:
- The famous "Norway issue" (solved in YAML 1.2)
- Leading zero parse as octal (solved in YAML 1.2)
- Overeager type-coercion for numbers, dates, times etc. can be confusing.
- Different modes for processing multi-line strings can be quite confusing.
- Unsafe serialization (not an issue for modern parsers, but you need to be careful when using YAML on a veteran language with dynamic features like Ruby, Python or Java).
All of these are issues with the YAML spec itself.