4 ms·
I want to write YAML because I don't want my configuration to look significantly different in go, java, ruby, or any other language my organization may use in t
by ebiester 8y ago
I want to write YAML because I don't want my configuration to look significantly different in go, java, ruby, or any other language my organization may use in the future.
Xml is fine. Json is fine. Yaml is fine. Yes, they have warts. That's fine too.
- drb91 8y agoNone of the languages mentioned are whitespace sensitive or look much like YAML at all.
- simcop2387 8y agoFor most things lately I've been using TOML because it gets me that, and it's a relatively simple (to a human) standard. Combined with there being parsers and emitters in just about every language now, it's a great option. You get sections in the config that map easily to native data structures in the languages, good string handling, can create a few more advanced things like arrays (really useful for adding multiple ports or listening addresses, etc.). I do still use YAML on the rare occasion where i just don't like how the TOML ends up looking[1]. My plan with that example is to eventually make a more simplist DSL that can handle the usecase, but my first attempts didn't produce anything I liked. [1] https://github.com/perlbot/App-EvalServerAdvanced/blob/master/skel-sandbox/etc/seccomp.yaml https://github.com/perlbot/App-EvalServerAdvanced/blob/maste...