6 comments

[ 3.0 ms ] story [ 28.0 ms ] thread
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.
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.
>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.

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