Spaces *should* only be used within string constants (as needed), or when the language otherwise requires them.  The editor should format the code according to user preferences.<div><br></div><div>Absent that, spaces represent the lowest common denominator of formatting, so we can all use them and our text shows up as we desire regardless of editor or setting.</div>
<div><br></div><div>Can we move along now?  This argument was old 30 years ago.  Perhaps we should do VI vs. EMACS while we are at it.<br><br></div><div></snipe></div><div><br><div class="gmail_quote">On Mon, Apr 11, 2011 at 10:13 PM, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com">jmdavisProg@gmx.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">> "Jonathan M Davis" <<a href="mailto:jmdavisProg@gmx.com">jmdavisProg@gmx.com</a>> wrote in message<br>

> news:mailman.3412.1302578409.4748.digitalmars-d@puremagic.com...<br>
><br>
> >> On 04/11/2011 08:13 AM, Jonathan M Davis wrote:<br>
> >> > They mix tabs and spaces. On some lines, they use spaces and on others<br>
> >> > they use tabs.<br>
> >><br>
> >> Never seen this, not even once. Messing can only happen when one<br>
> >> copy-pastes from modules using spaces.<br>
> ><br>
> > As Steve pointed out, it frequently happens when you have multiple<br>
> > developers<br>
> > working on the same code. It may work with one developer who likes using<br>
> > tabs,<br>
> > but as soon as you get a mix of developers, you invariably get a mix of<br>
> > spaces<br>
> > and tabs unless _everyone_ involved is really careful, and that rarely<br>
> > happens. It's just too easy to use spaces without realizing that someone<br>
> > else<br>
> > used tabs or even that you yourself are using spaces, depending on your<br>
> > editor's settings.<br>
><br>
> That applies the other way around, too.<br>
><br>
> > Using only spaces and no tabs avoids the entire issue...<br>
><br>
> It avoid the issue *as well as* using only tabs for indentation.<br>
<br>
</div></div>No, because you _always_ have spaces. It's not like you stop using the<br>
spacebar just because your tab key is actually inserting tab characters. If<br>
you have tabs, then you're still going to have spaces. It's just a question of<br>
whether those involved in the project are disciplined enough to avoid ever<br>
using spaces for indenting. If, on the other hand, you only allow spaces, then<br>
you don't have the same concern about tabs being inserted. True, someone's<br>
editor could be set up poorly for either situation and insert spaces where<br>
they shouldn't or tabs where they shouldn't, but it's generally trivial to set<br>
up an editor to _never_ input tabs that it's easy to make it so that tabs are<br>
never used. However, the same can't be said of using tabs, because it's always<br>
possible to input spaces with the spacebar.<br>
<br>
It's true that people occasionally end up inserting tabs in space-only<br>
environments, but in my experience, it's fairly rare. It's pretty much a<br>
guarantee, however, that _someone_ will insert spaces in an environment where<br>
it's supposed to be tabs.<br>
<br>
There's not much point in arguing the matter. Some folks prefer tabs, and some<br>
prefer spaces, but I believe that it's most common for spaces to be preferred<br>
as far as style guides go, and they're generally less error-prone simply<br>
because it's easy enough to set up editors so that tabs are never used, and<br>
you can't do the same with spaces when you're using tabs for indentation.<br>
<font color="#888888"><br>
- Jonathan M Davis<br>
</font></blockquote></div><br></div>