Click here to Skip to main content
15,889,200 members

Survey Results

Soft tabs (spaces) or Hard tabs (CHAR(9)) in your source code?   [Edit]

Survey period: 21 Jun 2010 to 28 Jun 2010

Religous wars have been fought over lesser topics. (Suggested by Kornman00)

OptionVotes% 
Hard, always38442.76
Soft, always31935.52
Hard in some files, soft in others, using a consistent rule717.91
No preference12413.81



 
JokeThe first thing I saw in survey section Pin
Amar Chaudhary26-Jun-10 10:41
Amar Chaudhary26-Jun-10 10:41 
GeneralRe: The first thing I saw in survey section Pin
hfrmobile28-Jun-10 23:27
hfrmobile28-Jun-10 23:27 
GeneralElastic TabStops by Nick Gravgaard [modified] Pin
TonyHenrique26-Jun-10 10:15
TonyHenrique26-Jun-10 10:15 
GeneralRe: Elastic TabStops by Nick Gravgaard Pin
Mladen Janković26-Jun-10 16:15
Mladen Janković26-Jun-10 16:15 
GeneralRe: Elastic TabStops by Nick Gravgaard Pin
hfrmobile28-Jun-10 23:25
hfrmobile28-Jun-10 23:25 
GeneralRe: Elastic TabStops by Nick Gravgaard Pin
hfrmobile28-Jun-10 23:24
hfrmobile28-Jun-10 23:24 
GeneralIt's a source revision control problem Pin
TheGreatAndPowerfulOz25-Jun-10 10:13
TheGreatAndPowerfulOz25-Jun-10 10:13 
GeneralRe: It's a source revision control problem Pin
PIEBALDconsult25-Jun-10 19:07
mvePIEBALDconsult25-Jun-10 19:07 
GeneralRe: It's a source revision control problem Pin
TheGreatAndPowerfulOz28-Jun-10 9:50
TheGreatAndPowerfulOz28-Jun-10 9:50 
GeneralSoft only, please!!! Pin
big_sticks25-Jun-10 2:44
big_sticks25-Jun-10 2:44 
Most developers become used to using the editor of their choice. Forcing a single editor for all to use seems harsh since most developers need to adapt to the coding style where they work. As different editors expand tabs differently, legacy code takes on a bizarre appearance if tab characters are inconsistently used if a given file.
For example, the inconsistent use of tab characters has encouraged several types of software defects.

Consider the following;
(previous_code);

if (some_condition)
(do_this);
(do_this_too);

(subsequent_code);

Was the author's intent that do_this_too only be executed if some_condition was true? No way to tell from here. Obviously, that is not how the code gets executed and this could caused by a single tab setting (spaces per tab) being set differently than the original author's setting.

Obviously braces should be required to avoid this confusion.

This is only one of several cases caused by allowing tabs in source code.
GeneralRe: Soft only, please!!! Pin
big_sticks25-Jun-10 2:49
big_sticks25-Jun-10 2:49 
GeneralRe: Soft only, please!!! Pin
hfrmobile28-Jun-10 23:17
hfrmobile28-Jun-10 23:17 
GeneralRe: Soft only, please!!! Pin
big_sticks29-Jun-10 7:03
big_sticks29-Jun-10 7:03 
GeneralObviously Pin
peterchen22-Jun-10 2:38
peterchen22-Jun-10 2:38 
GeneralRe: Obviously Pin
hfrmobile28-Jun-10 23:11
hfrmobile28-Jun-10 23:11 
GeneralRe: Obviously Pin
peterchen29-Jun-10 1:37
peterchen29-Jun-10 1:37 
GeneralRe: Obviously Pin
hfrmobile1-Jul-10 1:24
hfrmobile1-Jul-10 1:24 
GeneralRe: Obviously Pin
peterchen1-Jul-10 1:48
peterchen1-Jul-10 1:48 
GeneralSoft tabs may be better Pin
Blubbo22-Jun-10 2:12
Blubbo22-Jun-10 2:12 
GeneralRe: Soft tabs may be better Pin
HallK24-Jun-10 20:42
HallK24-Jun-10 20:42 
GeneralRe: Soft tabs may be better Pin
Blubbo25-Jun-10 5:08
Blubbo25-Jun-10 5:08 
GeneralRe: Soft tabs may be better Pin
hfrmobile28-Jun-10 22:53
hfrmobile28-Jun-10 22:53 
GeneralCommon format Tabs / Space Pin
leiricho21-Jun-10 22:47
leiricho21-Jun-10 22:47 
GeneralRe: Common format Tabs / Space Pin
PIEBALDconsult23-Jun-10 18:09
mvePIEBALDconsult23-Jun-10 18:09 
GeneralRe: Common format Tabs / Space Pin
leiricho23-Jun-10 20:55
leiricho23-Jun-10 20:55 

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.