Boost logo

Boost :

From: William E. Kempf (williamkempf_at_[hidden])
Date: 2002-09-09 17:33:59


From: "Terje Slettebø" <tslettebo_at_[hidden]>
> Note that the arguments in the article against tabs (alignment problems)
are
> fixed by using spaces for alignment, and you _still_ get the tab size you
> want.

Mixing tabs (for indentation) and spaces (for alignment) doesn't work in
many cases.

<tab>if (foo)<sp><sp><sp>// If foo is true
<tab><tab>bar();<sp>// then call bar

If <tab>s are specified as 4 spaces in your editor then these comments align
correctly, but if the <tab> is another size (like 3) it likely won't.
Alignments on lines that are indented the same work, but if the alignment
must span lines that have differring indentations (which isn't that
uncommon) then use of tabs causes problems here.

There's pros and cons in both directions. I think spaces are a better
answer, but in any event, historical reasons indicate we aren't likely to
change now unless there's a clear winner in the decision to switch to tabs,
which there won't be.

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk