4 ms·
This guy gets it. Tabs for indent, spaces for formatting within. No need to push your tab size standards on the next person to edit your code, and no need to f
by mikejmoffitt 9y ago
This guy gets it.
Tabs for indent, spaces for formatting within. No need to push your tab size standards on the next person to edit your code, and no need to force their editor to retab it to their preference, and back again when it's saved.
"It's the editor's default", or worse, "I never really thought about it" are horrible reasons for doing anything, and hearing something else might be a sign of a pulse.
- ramses0 9y agoI also prefer tabs, but always make sure to write spaces to disk. The better you are with your editor, the less you have to worry about whether the original file was using spaces or tabs. Therefore, writing 100% spaces to disk is the best way to insulate yourself from possible issues of people who _don't_ know what they're doing with spaces, tabs, or their editor.
- tracker1 9y agoPlus, when most people are using an editor that doesn't have a per-project settings for the language/format to use, it's really hard. Getting everyone else on a VS solution to change their JS editor to 2 spaces, and disable the auto-format is an exercise in frustration. That said, the convention for most languages seems to be towards spaces at this point, and I don't care enough to argue anymore as my choice of editor(s) allows me to set it per project at least.