To me, that makes it sound like you’re writing too much and too complex yaml files manually, and/or that you don’t have good enough CI to catch invalid configurations. Unless, of course, you have very few prod failures overall, and the few that happen are due to yaml indentation, which I still think is a bit weird, since an invalid config caused by incorrect indentation should ideally be caught at compile time (if you’re generating code from the yaml) or by some linter or something (if you’re using it for config).
- 0 Posts
- 5 Comments
I’ll agree that significant whitespace can be a PITA (one of the reasons I prefer json over yaml), but at the same time I think improper or lacking indentation hurts readability even more than significant whitespace. Toml basically encourages a completely flat structure, where objects and sub-objects are defined all over the place. At that point, I much prefer an enforced structure with whitespace.
.vscodewould like a word.But besides that, I just can’t understand why even someone that hates
JSONwould chooseTOMLoverYAMLfor a config file.
I’ve never gotten to be good friends with
toml. I’ve never liked that the properties of some thing can be defined all over the place, and I’ve definitely never liked that it’s so hard to read nested properties.JSONis my friend.


Oh, I definitely agree that meaningful whitespace can be a pain, and I’m not a very big fan in general (although I prefer meaningful whitespace like in Python to terribly indented code with regards to readability). I guess my point was just that if you’re having a lot of failures due to incorrect indentation, it sounds like a systemic issue somewhere. While meaningful indentation can be annoying, I think it sounds like symptom of something more if it’s responsible for most of your production failures.
I think the bottom line for me is that if a config file regularly causes errors because of incorrect indentation, it should probably be refactored, since it’s clearly not easy enough to read that those errors are caught.