Comments 1 - 8 of 8 Search these comments
Just map your tab key to the number spaces you want.
Tab character is evil, going forward it should be removed or replaced from the key board.
Even if you never use the Tab ASCII character, the tab key still has use for moving focus to the next form element.
Tabs are individually hard to see and annoying, like a mosquito in one's bedroom at night. Collectively, they are a disaster for humanity on the scale of malaria.
One character should look like one character, and never like a variable number of characters depending on who might be viewing it. Code cannot get better aligned than a perfect grid, as it is with spaces. With tabs, the perfect grid is destroyed, so that one line cannot reliably refer to the previous line with a carat ^, or line up trailing comments with the comments on the previous line.
With spaces, all members of a team see the exact same thing, which is important for communicating code intent and parallel statements via formatting.
Everyone wants his beautiful work to appear right for everyone else, but tabs make the work inconsistent and ugly.
The argument that we can all have different indentation levels only by using tabs is false. Those who want different tab sizes can autoconvert leading spaces to tabs with their editor, and convert back to spaces when committing code. Everyone can have what he wants if everyone uses pure spaces as the definitive indentation format. Not so with tabs, because with tabs, it is inevitably necessary to mix in spaces at times, resulting in confusion. Tabs jumble things up when people use different tabstops. And if a team all uses the same tabstop, then why not just use spaces?
One might try to argue the reverse, that tabs should be the standard and people who want spaces should autoconvert leading tabs to spaces, but that does not work for the simple reason that information is lost when spaces get converted to tabs. Things can be perfectly lined up with spaces. But if starting from tabs and converting to spaces, there is no inherent way to know exactly how far one should space to retain alignment because tabs lack that information.
Tabs are ambiguous. Or think of it in terms of information: four spaces, being four characters, contain more information than one tab does. The tab says "move over some unknown distance". The spaces says "move over exactly this specific distance". The cost of storing that information is trivial these days, and the value of the information is significant.
Imagine replacing the Cartesian coordinate system with a system where increasing a value on the x axis is always subject to uncertainty. You would never be able to graph anything correctly.
Spaces mean happiness for everyone. Tabs mean unnecessary complexity and sadness.
Tabs were meant for making tables, not for indentation. That's why they are called tabs.
Tabs failed both at making tables and at indentation.
With spaces, what one sees is what one gets. Tabs are invisible to the naked eye, so one cannot know where things are just by looking. The code might be a mix of tabs, spaces, tabs...
With spaces, life is simple. In vim, when displaying the cursor position on a line with "set ruler", one gets two numbers with tabs. WTF? Oh, it's characters and columns! Why? Why bother to add the ambiguity and complexity?
Spaces are not optional. All written works in the last few thousand years have used spaces. Code will have spaces for sure. Tabs are optional, a harmful extra complication.
It’s impossible to get spaces wrong. There is no "spacestop". There is only the annoying and inconsistent "tabstop", which no one needs to use if no one uses tabs.
Every IDE/editor supports replacing tab presses with a number of spaces. There is no speed to be gained in using tabs.
When one copies and pastes code with spaces, it always works perfectly.
When one copies and pastes code with tabs, it may get fucked up in various ways, such as seeing tabs come out as ^I.
Python is indentation based, and Guido recommends spaces. Python users know about indentation, because the language depends on it.
Book and magazine publishers can't deal with tabs in source-code listings to be printed. They demand conversion to spaces. And they are right to make that demand.
The right answer for misguided people with tab fetishes is to convert spaces to tabs when reading, and tabs to spaces when writing.
Would babies really die if we just said 4 spaces, everywhere, always, no choice - and moved on?