Click here to Skip to main content
14,580,625 members

Welcome to the Lounge


For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
GeneralRe: Tabs Pin
Stefan_Lang4-Mar-20 21:28
mveStefan_Lang4-Mar-20 21:28 
GeneralRe: Tabs Pin
g_p_l3-Mar-20 22:46
Memberg_p_l3-Mar-20 22:46 
GeneralRe: Tabs Pin
Skip-Sailors5-Mar-20 5:47
MemberSkip-Sailors5-Mar-20 5:47 
GeneralRe: Tabs Pin
Richard MacCutchan3-Mar-20 22:18
mveRichard MacCutchan3-Mar-20 22:18 
GeneralRe: Tabs Pin
lw@zi 3-Mar-20 22:27
professional lw@zi 3-Mar-20 22:27 
GeneralRe: Tabs Pin
Richard MacCutchan3-Mar-20 22:56
mveRichard MacCutchan3-Mar-20 22:56 
GeneralRe: Tabs Pin
Member 79891224-Mar-20 2:32
MemberMember 79891224-Mar-20 2:32 
I'd think that it is older than Unix.

In Fortran, cols 1-5 were reserved for labels. Col 6 was for a line continuation marker. You could start your code in col 7, but then the continuation marker would be adjacent to the code, possibly disturbing the reading of the line (if, say, you use digits 1, 2, 3... to mark the order of continuation lines, and the code line starts with a numeric. So you set the tab stop at 8.

In the Fortran days, indenting loops was not very common; code was written from pos 8 - the left margin labels were good enough marking of loops. The problem of rightward migration of the source code was not relevant.

In those days, it was common to have arbitrary tab stops (like on most old mechanical typewriters). Often, a programming language recommended certain tab stops: If my memory is correct, Fortran (if you used tabs at all!) recommended stops at 8, 14, 20 and then for every 10. On a punched card, there was no way to tell if you had moved out to col 14 using the tab stop or the space bar - either left no hole!

When evenly spaced tab stops were getting common, there were some fighting about what comes after 8 - is it 15 (the first tab brought you 7 positions out from the margin, 8 + 7 = 15)? Or is it 16, (counting starts at 0, so n tabs brings you to position 8*n)? Or 17, the first one 8 cols out from the margin, i.e. at pos 9? If Fortran had still been strong, I guess the third alternative (9, 17, 25...) would have been rejected, but it is the most consistent and easiest to handle, so it won.

If there had never been any disagreemet about the positions/intervals, causing chaos in line/table layout when moving text files around, maybe tabs would have been popular today. More and more people are rejecting it, both because of the non-standardization and (among software developers) because they came to hate it through makefiles. In modern days the tab key has become common as a navigation key in GUIs, for moving to the next edit field, which further discourages its use as a text input key. Python is actively discouraging tabs.

I am happy about it. As an input method, it is fine, as long as it has the semantics of "Space fill up to the next tab position" (rather than inserting a tab character code into the file).

I hate it when some tab-loving co-worker edits "my" files, and garbles up some nicely lined up declarations, comments etc. Some garble not only the lines they edit, inserting tab characters, but their editors (don't ask me which one they are using) replace any run of 2+ spaces up to a tab stop, throughout the file(s). Today, most of our projects state explicitly that their source files shall contain no tab stops, so we are gradually able to control it. We did have a pre-commit plugin rejecting commit of files with tab stops, but then there were projects still using classical makefiles, so we had to slack up on that. Maybe we could have allowed tabs if we forced everybody to use the same identically configured editor/IDE, but if we tried to enforce that, I'm sure that several of our young energetic employees would have left the company.
GeneralRe: Tabs Pin
Richard MacCutchan4-Mar-20 2:50
mveRichard MacCutchan4-Mar-20 2:50 
GeneralRe: Tabs Pin
Member 79891224-Mar-20 3:12
MemberMember 79891224-Mar-20 3:12 
GeneralRe: Tabs Pin
Richard MacCutchan4-Mar-20 3:31
mveRichard MacCutchan4-Mar-20 3:31 
GeneralRe: Tabs Pin
Member 79891224-Mar-20 5:02
MemberMember 79891224-Mar-20 5:02 
GeneralRe: Tabs Pin
Richard MacCutchan4-Mar-20 5:12
mveRichard MacCutchan4-Mar-20 5:12 
GeneralRe: Tabs Pin
  Forogar  4-Mar-20 3:53
professional  Forogar  4-Mar-20 3:53 
GeneralRe: Tabs Pin
Dan Neely4-Mar-20 3:26
MemberDan Neely4-Mar-20 3:26 
GeneralRe: Tabs Pin
Member 79891224-Mar-20 4:41
MemberMember 79891224-Mar-20 4:41 
GeneralRe: Tabs Pin
Fever9055-Mar-20 3:44
professionalFever9055-Mar-20 3:44 
GeneralRe: Tabs Pin
Stefan_Lang4-Mar-20 21:32
mveStefan_Lang4-Mar-20 21:32 
GeneralRe: Tabs Pin
KLSmith5-Mar-20 5:15
MemberKLSmith5-Mar-20 5:15 
GeneralRe: Tabs Pin
Kirk 103898216-Mar-20 3:59
MemberKirk 103898216-Mar-20 3:59 
GeneralRe: Tabs Pin
BillWoodruff3-Mar-20 22:29
mveBillWoodruff3-Mar-20 22:29 
GeneralRe: Tabs Pin
Greg Utas4-Mar-20 1:35
professionalGreg Utas4-Mar-20 1:35 
GeneralRe: Tabs Pin
W Balboos, GHB4-Mar-20 1:39
mveW Balboos, GHB4-Mar-20 1:39 
GeneralRe: Tabs Pin
Member 79891224-Mar-20 2:51
MemberMember 79891224-Mar-20 2:51 
GeneralRe: Tabs Pin
W Balboos, GHB4-Mar-20 5:08
mveW Balboos, GHB4-Mar-20 5:08 
GeneralRe: Tabs Pin
Member 79891224-Mar-20 12:25
MemberMember 79891224-Mar-20 12:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.