• 0 Posts
  • 5 Comments
Joined 3 years ago
cake
Cake day: June 18th, 2023

help-circle
  • 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.


  • 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).


  • 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.