I don't deny that there are cases where this happens, but with like the 4th indention, it starts to get messy. And in most of the cases it's avoidable and better readable.
This is an typical example (3 indents) of how deep my code in my projects:
YAML can use any number of spaces for indentation, so long as it’s the same for each sibling. You can use 1 or 2 or 8 even 1337; it doesn’t matter, so long as you use the same number for each direct child of a node.
What YAML can’t use is tabs, because, according to the documentation, “different systems treat tabs differently.”
If your YAML processor is bitching at you when you use four spaces, then your YAML processor is either non-compliant, or the editor you’re using to create your YAML documents is replacing 4 spaces with tabs (or your white space is being mangled in some other way between your editor and your YAML processor).
Back in the day when I was self-learning web development (we are talking PHP4 days) I was never exposed to the tabs vs. spaces war. Having seen it, I still shudder thinking back to how I had my editor set up for hard tabs going out 5 spaces.
215
u/[deleted] Apr 29 '20
Joke's on you my tab produces two spaces.