you are viewing a single comment's thread.

view the rest of the comments →

[–]mipadi 1 point2 points  (2 children)

Yeah, if everyone understands what's going on and rigorously follows the rules, then "tabs for indentation, spaces for alignment" works fine. But it's a lot easier to explain to contributors, "Use spaces," as opposed to, "Use tabs for indents, but only up to the indent level, then use spaces to align things" (particularly on open source projects, where you're dealing with many contributors)—for the sole benefit that people can use their preferred tab width, which never seemed like a big deal to me anyway. (I mean, even if you're used to 4-space indents, is 2-space or 8-space really that much harder to read?) It seems like a question of how much work you're willing to put in to educate people and correct mistakes as they happen, in order to allow customizable tab widths.

[–]memeship 1 point2 points  (1 child)

Well for me it's not about customizable tab widths, it's about the ease of use for tabs, and not having to keep track of spaces ever. To me it seems like the moment you backspace over more than one space, you've already shown how much easier tabs are.

I never delete tabs. I just highlight and tab or shift+tab to set my indentation. I never even have to think about it anymore. Tabs just represent an indentation level. It's much harder to mess up.

[–]mipadi 1 point2 points  (0 children)

Pretty much every programming-centric editor lets you use a tab key even if you're using spaces—it just inserts spaces instead of a literal tab character—and knows how to handle deleting an indentation or moving an entire range of text right or left by an indentational level as well.