3 ms·
YAML is kind of like C++: > You like C++ because you're only using 20% of it. And that's fine, everyone only uses 20% of C++, the problem is that everyone uses
by cstrahan 3y ago
YAML is kind of like C++:
> You like C++ because you're only using 20% of it. And that's fine, everyone only uses 20% of C++, the problem is that everyone uses a different 20% :)
https://eli.thegreenplace.net/2009/10/17/the-c-bashing-season-is-back https://eli.thegreenplace.net/2009/10/17/the-c-bashing-seaso...
The YAML footguns are too numerous to reproduce here, so here are some sources:
https://stackoverflow.com/questions/3790454/how-do-i-break-a-string-in-yaml-over-multiple-lines/21699210#21699210 https://stackoverflow.com/questions/3790454/how-do-i-break-a...
https://www.arp242.net/yaml-config.html https://www.arp242.net/yaml-config.html
https://noyaml.com/ https://noyaml.com/
YAML isn't terrible if you only ever have to read what you wrote. Now consider that there are 63 different ways to write multi-line strings in YAML -- how many of those have you committed to memory? Yeah... now throw 10-100 developers into the mix, each with their own favorite alternative syntaxes -- good luck making sense of your YAML.
- bbkane 3y agoPoint taken, but you can mitigate a lot of this with yamllint.
- 8n4vidtmkvmk 3y agoThat's pretty sad that you need to lint your config lang.
- bbkane 3y agoI used to feel that way, and in some sense I still do, but in practice it fits right in with my other linters so it's not any trouble. Config language design seems to have a surprisingly "bumpy" design space, where optimizing for one thing (human readability, or human familiarity, or tooling support, or flat data, or nested data, or strong types, or DRY, etc...) necessitates tradeoffs in other areas. No wonder there's so many config languages!
- desmondl 3y agoYeah true, I'm starting to remember the headaches with yaml when I was using kubernetes or cloudformation....