
Why I Indent My Code 8 Spaces? (2018) - amrrs
https://simplystatistics.org/2018/07/27/why-i-indent-my-code-8-spaces/
======
duiker101
The very same reason why your eyes are aging is the reason why you should not
use spaces at all, but tabs.

[https://www.reddit.com/r/javascript/comments/c8drjo/nobody_t...](https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/)

Discussed:

\-
[https://news.ycombinator.com/item?id=20341354](https://news.ycombinator.com/item?id=20341354)

\-
[https://news.ycombinator.com/item?id=20381027](https://news.ycombinator.com/item?id=20381027)

~~~
cjfd
Very true. The only way to get consistent formatting across tab settings is to
use tabs for indentation and spaces for aligning things.

------
dTal
>Tabs are 8 characters, and thus indentations are also 8 characters. There are
heretic movements that try to make indentations 4 (or even 2!) characters
deep, and that is akin to trying to define the value of PI to be 3.

This is flat wrong. Tabs are one character, not 8, and they always take a
variable amount of space. Proof: type 3 spaces. Now type <tab>. Your cursor
will not be 11 "characters" over. It will be at the next tabstop multiple,
which will likely be either column 4 or 8. The fiction that tabs are somehow
composed of a fixed number of multiple "spaces" (a completely unrelated
whitespace character) is only sustainable by restricting tabs to the beginning
of lines; programmers who fail to understand this and treat tabs as "a typing
shortcut for lots of spaces" will inevitably be burned when they try to use
tabs for alignment.

Tabs are not made of spaces. They do not have a globally defined or even a
locally fixed width. This is right and proper and really not that complicated.

------
viraptor
This is measuring X by observing side effect Y. If you want to avoid high
indent levels or high cyclomatic complexity, setup your environment to check
for it. Indent width is just a poor proxy for that.

------
lemcoe9
I may be one of few that actually do not care about the tabs versus spaces
"argument." I meet others that use one or the other, and then realize how
insignificant that choice is at the end of the day, especially when most IDEs
will manage and convert from one convention to another, with ease.

------
60sec
Missing 4 character comparison. I find 4 chars easier to read personally.

