Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×

Comment Re:Tabs vs Spaces (Score 1) 428

It's PEBCAK, actually.
Tabs for indentation are a good thing, because people have different tastes wrt. indentation width (I use tabstop 8 and reading stuff indented with 4 or even 2 spaces is a PITA).
The problem is, people are doing it wrong, and insert tabs after non-tab characters. And will use tabs for line-continuation indentation, which leads to a messy look when viewed at something else than the tabstop the original author used. And then it ends in tears.

Wrong:
<TAB>int foo =<TAB>42;

Wrong:
<TAB><TAB>foobar(so, many, arguments, here,
<TAB><TAB><TAB><TAB>the, line, must,
<TAB><TAB><TAB><TAB>be, continued);

Correct (period represents space):
<TAB><TAB>foobar(so, many, arguments, here,
<TAB><TAB>....the, line, must,
<TAB><TAB>....be, continued);

Doing it as shown in the last example, adjusting the tabstop will provide a convenient way to adjust the indentation to personal preference without causing a mess.

Slashdot Top Deals

It is not every question that deserves an answer. -- Publilius Syrus

Working...