Because for the "1 char" the editor can be configured to show it as how many character spaces it chooses. This makes tabs visually inconsistent. If I open a file in an editor and I suddenly see 2 spaces (that is 1 tab) but in a different editor (or in the terminal; or both (vi, emacs, etc.)) I look at the same file and it's 4 spaces, that violates POLA.
Whereas with spaces you know what indentation level you're at when looking at the code in any visual format, since it's always the same as 4 space widths characters worth of space..
Serious question, why don't we want the developer to have control over the indentation level? Why is it preferable that you get to control the indents on my screen? What if I prefer 2 and you prefer 4?
Oh look, a condescending non-answer. why not use tabs and let me worry about indentation? Are you not answering because there isn't a good answer? If it were really about readability, why wouldn't you use the character that allows me to decide what's readable? You have tabs set to 4? Congrats. You're using 4 spaces. I have tabs set to 2? Congrats, I'm using 2 spaces.
Yeah this example makes the most sense. You can't just do tabs for indention and spaces for alignment and not end up with code like this. Even if you could, it would be impossible to enforce...
0
u/[deleted] Jul 25 '18
[deleted]