You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Mike Stover <ms...@apache.org> on 2003/01/05 04:44:19 UTC
Re: code standards, tabs
> -1, tabs are being dropped by most projects because they make interpretation
> of the diffs harder, different editors interpret them differently, etc.
I don't see how it affects diffs. And editors interpreting them differently is the whole
point.
--
Michael Stover
mstover1@apache.org
Yahoo IM: mstover_ya
ICQ: 152975688
AIM: mstover777
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: code standards, tabs
Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Mike Stover wrote:
>>-1, tabs are being dropped by most projects because they make interpretation
>>of the diffs harder, different editors interpret them differently, etc.
>
>
> I don't see how it affects diffs.
When you get diffs with tabs, CVS will insert '-' and '+' characters. With
tabs, the formatting goes to hell and it can be difficult to understand in
which block changes occur. This is my experience. With spaces this is never
a problem.
> And editors interpreting them differently is the whole
> point.
>
Not sure what you mean. The official Sun style guide distinguishes between
tabs and indents. Tabs always take you to a tabstop at multiples of 8. I
believe this is also the emacs standard. So when you set an indent size of
4, the first indent is implemented with 4 spaces and the second level by 1 tab.
A lot of editors, OTOH, use tabs as the indent marker, so setting an indent
size of 4, causes that editor to use 1 tab for the first indent and 2 tabs
for the second indent.
Now think about how the code from each editor looks in the other editor
Case 1:
if (tabs != indent) {
looksBadlyIndented();
}
Case 2:
if (tabs == indent) {
looksBadToo();
}
By using spaces I can be sure that code rendered in your editor is the same
as code rendered in my editor - we see the same thing - and that is good.
So, editors interpreting tabs differently is a bad thing because people will
tend to reformat the code to look right in their editor. :-)
In the end this is probably a religious issue bu the above is why I prefer
spaces.
Conor
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>