Re: tab characters in news

From: Chris Sonnack (
Date: 04/29/04

Date: Thu, 29 Apr 2004 11:35:46 -0500

Corey Murtagh wrote:

>>> How many times have you seen odd-ball combinations of hard tabs
>>> and spaces used for sourcecode indenting?
>> Thank you! That is **exactly** one of the reasons TABs should
>> never be used in source.
> While you see it as a reason to never use tabs, I see it as a
> reason to never use spaces for indenting. Funny how two people
> can arrive at opposite answers from the same data, isn't it? :>

Keeps life fresh and interesting! (-:

And I'd agree, either tactic works: use only spaces or use only TABs.
The problem, AISI, is that it's harder to enforce the latter than it
is the former. Absent some special "display TABs" option, it's not
visually obvious if a text has TABs, spaces or a mix. It's always
seemed to me that it far more likely someone will insert spaces to
a document than remember to use TABs (if for no other reason than
the size of the respective keyboard keys along with the fact that
spaces are used to delimit tokens (so everyone uses them somewhere)).

Thus, my bottom line is that it seems far more likely to me that a
document with TABs will become "unpure" than a document with spaces.

>> You never know (and I see this constantly) when someone won't
>> realize the source contains TABs and will manually use spaces
>> or use an editor that inserts spaces for TABs.
> Using actual tabs and being able to set tab width is a feature
> supported by any 'good' editor... and a lot of crap ones too.
> Even joe does it on Linux.

Of course, but that has nothing to do with what I wrote.

The point is that, while editing a document, a user may not recognize
that it contains TABs and will--perhaps by habit--use the SPACEBAR.

As soon as that happens, it's all over.

>> Once that happens your whole TAB scheme is corrupted.
> My 'TAB scheme' as you put it works if, and only if, people agree
> to use it. As long as everyone decides to use their own silly
> tabbing style, of course tabs aren't going to be useful.

Might be a terminolgy thing, but it's not about "tabbing style".
As you've said, SO LONG AS TABS ARE USED RELIGIOUSLY, the tab width
can be set to anything the user likes.

To me, it's about what I might call "keyboarding style". What I've
found is that it's very, very hard to guarentee that religious use
of the TAB key. It's just to easy to use the SPACEBAR, *because*
(a) it's the biggest darn key on the keyboard, and (2) it's such a
common way of inserting spaces--think how many times you hit the
thing when separating (opposed to indenting) source tokens.

A thought I just had: a document with TABs "lies" to you!

The *visual* indenting is an artifact of your editor, NOT an inate
property of the document (conversely, the *level* of indenting IS).

Because of that visual lie ("Hmmm, looks like four spaces on the
line above, so I'll hit SPACEBAR four times..."), my experience is
that it's hard to keep a TAB-indented document pure.

>> Your editor will convert spaces back to TABs?
> If I tell it to, yeah. It's a simple matter of selecting the
> original tab width (once I figure out I need to), convert leading
> tabs to spaces, change tab width, convert leading spaces to tabs.
> Takes all of about 3 seconds... a little more if I forget the
> shortcut keys :>

What does it do if the indenting is mixed?

Are your shortcut keys invoking a macro of some sort? IOW, masking
a tedious process? Doesn't that highlight the very difficulties
inherent in TABs?

>> Just say NO! (-:
> Sorry Chris, looks like we're going to disagree on this.

Well, I tried! No problem!! (-:

|_ CJSonnack <> _____________| How's my programming? |
|_ ___________________| Call: 1-800-DEV-NULL  |