Tabs -vs- Spaces: Tabs should have won.
Anders J. Munch
2011 at jmunch.dk
Sun Jul 17 05:49:14 EDT 2011
Steven D'Aprano wrote:
> I can't fathom why 8 position tabs were *ever* the default, let alone why
> they are still the default.
That's because they were not invented as a means for programmers to vary
Originally, tabs were a navigation device: When you press the tab key, you skip
ahead to the next tab column. The notion that whitespace characters are
inserted into the text would have been very alien to someone using text
processing software anno 1970. Same thing with space and enter; on typewriters
the space bar doesn't "type" anything onto the paper, it moves to the next
column, and that thinking carried over to computers.
The reason the tab stop is a full 8 positions: for faster navigation. If it
were 3 positions, it would take forever to skip from the start of line to column
60. You'd appreciate that, if you were e.g. writing a fiduciary report with
some text to the left and two number columns to the right, back in the day
before spreadsheets and word processor tables. Skip a column or two too far?
Adjust by backspacing (another navigation key).
As for why 8 is still the default - well, what else should it be? 2, 3, 4, 5? I
for one am thankful that we have so far been spared the flamewar armegeddon of
all the world's programmers trying to agree on that.
> Cameron Simpson wrote:
>> Personally, I like to use the tab _key_ as an input device, but to have
>> my editor write real spaces to the file in consequence.
Just like in the old days:)
More information about the Python-list