4 ms·
I find YAML an incredibly difficult configuration format to write by hand for anything but the simplest of files. Agree it’s a sterilisation format and not a gr
by BFLpL0QNek 5y ago
I find YAML an incredibly difficult configuration format to write by hand for anything but the simplest of files. Agree it’s a sterilisation format and not a great one.
Likewise for JSON. No one can say setting up a webpack config is simple which uses JSON.
It’s a recent trend. I hate working with the Kubernetes ecosystem as it’s lines of YAML config.
At the same time I love working with OpenBSD / Linux. OpenBSD especially, the config files are simple and concise.
TOML is my preference if I need a config file, it’s easy to read/write and reasonably expressive.
- nanis 5y agoSpecifically, neither YAML nor JSON are configuration formats (despite everyone's desire to use them as such). TOML is a very good generalization of a simple, straightforward configuration file format which was the "best" until TOML came around. If a service you are using needs JSON/YAML, you can generate it. But, stick with a configuration file format that is suitable for humans for actual configuration. Also, PSA, neither JSON nor YAML files are good places to embed logic. Also, another PSA, the fact that Pipfile is just a TOML file is just silly. Another point in Ruby's favor.
- kangalioo 5y agoI think JSON is an easier configuration format than YAML. YAML is so complicated when you include all the edge cases. For example I still have no idea when you need a leading `- ` and when it's not needed. I'm not saying YAML can't be learned, but why learn all the quirks of a new format when we can just use JSON which everyone already knows? It does the same job, especially when you use JSON5 or HJSON. It's still intuitive, also supports comments and multiline strings etc, and you don't have to deal with the mess that is YAML syntax. If only...